minor style fixes

This commit is contained in:
Michael Scire 2019-04-03 12:34:18 -07:00 committed by fincs
parent 017b47151d
commit e4dda8fa46
5 changed files with 13 additions and 13 deletions

View File

@ -1,6 +1,6 @@
/**
* @file aes.h
* @brief Switch accelerated AES-ECB implementation.
* @brief Hardware accelerated AES-ECB implementation.
* @copyright libnx Authors
*/
#pragma once

View File

@ -1,6 +1,6 @@
/**
* @file aes_cbc.h
* @brief Switch accelerated AES-CBC implementation.
* @brief Hardware accelerated AES-CBC implementation.
* @copyright libnx Authors
*/
#pragma once

View File

@ -1,6 +1,6 @@
/**
* @file aes_ctr.h
* @brief Switch accelerated AES-CTR implementation.
* @brief Hardware accelerated AES-CTR implementation.
* @copyright libnx Authors
*/
#pragma once

View File

@ -1,6 +1,6 @@
/**
* @file aes_xts.h
* @brief Switch accelerated AES-XTS implementation.
* @brief Hardware accelerated AES-XTS implementation.
* @copyright libnx Authors
*/
#pragma once
@ -36,20 +36,20 @@ typedef struct {
/// 128-bit XTS API.
void aes128XtsContextCreate(Aes128XtsContext *out, const void *key0, const void *key1, bool is_encryptor);
void aes128XtsContextResetTweak(Aes128XtsContext *ctx, const void *tweak);
void aes128XtsContextResetSector(Aes128XtsContext *ctx, uint64_t sector, bool nintendo);
void aes128XtsContextResetSector(Aes128XtsContext *ctx, uint64_t sector, bool is_nintendo);
size_t aes128XtsEncrypt(Aes128XtsContext *ctx, void *dst, const void *src, size_t size);
size_t aes128XtsDecrypt(Aes128XtsContext *ctx, void *dst, const void *src, size_t size);
/// 192-bit XTS API.
void aes192XtsContextCreate(Aes192XtsContext *out, const void *key0, const void *key1, bool is_encryptor);
void aes192XtsContextResetTweak(Aes192XtsContext *ctx, const void *tweak);
void aes192XtsContextResetSector(Aes192XtsContext *ctx, uint64_t sector, bool nintendo);
void aes192XtsContextResetSector(Aes192XtsContext *ctx, uint64_t sector, bool is_nintendo);
size_t aes192XtsEncrypt(Aes192XtsContext *ctx, void *dst, const void *src, size_t size);
size_t aes192XtsDecrypt(Aes192XtsContext *ctx, void *dst, const void *src, size_t size);
/// 256-bit XTS API.
void aes256XtsContextCreate(Aes256XtsContext *out, const void *key0, const void *key1, bool is_encryptor);
void aes256XtsContextResetTweak(Aes256XtsContext *ctx, const void *tweak);
void aes256XtsContextResetSector(Aes256XtsContext *ctx, uint64_t sector, bool nintendo);
void aes256XtsContextResetSector(Aes256XtsContext *ctx, uint64_t sector, bool is_nintendo);
size_t aes256XtsEncrypt(Aes256XtsContext *ctx, void *dst, const void *src, size_t size);
size_t aes256XtsDecrypt(Aes256XtsContext *ctx, void *dst, const void *src, size_t size);

View File

@ -129,10 +129,10 @@ void aes128XtsContextResetTweak(Aes128XtsContext *ctx, const void *tweak) {
ctx->num_buffered = 0;
}
void aes128XtsContextResetSector(Aes128XtsContext *ctx, uint64_t sector, bool nintendo) {
void aes128XtsContextResetSector(Aes128XtsContext *ctx, uint64_t sector, bool is_nintendo) {
/* Set and encrypt tweak, nothing is buffered. */
uint64_t *tweak_u64 = (uint64_t *)(&ctx->tweak);
if (nintendo) {
if (is_nintendo) {
/* Nintendo uses big endian tweak-from-sector, despite little endian gf multiplication. */
/* This is probably a Nintendo bug, but given all their content relies on it, not like it can change... */
tweak_u64[0] = 0;
@ -472,10 +472,10 @@ void aes192XtsContextResetTweak(Aes192XtsContext *ctx, const void *tweak) {
ctx->num_buffered = 0;
}
void aes192XtsContextResetSector(Aes192XtsContext *ctx, uint64_t sector, bool nintendo) {
void aes192XtsContextResetSector(Aes192XtsContext *ctx, uint64_t sector, bool is_nintendo) {
/* Set and encrypt tweak, nothing is buffered. */
uint64_t *tweak_u64 = (uint64_t *)(&ctx->tweak);
if (nintendo) {
if (is_nintendo) {
/* Nintendo uses big endian tweak-from-sector, despite little endian gf multiplication. */
/* This is probably a Nintendo bug, but given all their content relies on it, not like it can change... */
tweak_u64[0] = 0;
@ -835,10 +835,10 @@ void aes256XtsContextResetTweak(Aes256XtsContext *ctx, const void *tweak) {
ctx->num_buffered = 0;
}
void aes256XtsContextResetSector(Aes256XtsContext *ctx, uint64_t sector, bool nintendo) {
void aes256XtsContextResetSector(Aes256XtsContext *ctx, uint64_t sector, bool is_nintendo) {
/* Set and encrypt tweak, nothing is buffered. */
uint64_t *tweak_u64 = (uint64_t *)(&ctx->tweak);
if (nintendo) {
if (is_nintendo) {
/* Nintendo uses big endian tweak-from-sector, despite little endian gf multiplication. */
/* This is probably a Nintendo bug, but given all their content relies on it, not like it can change... */
tweak_u64[0] = 0;