AVR: Correct the indentation on hal_crypto_lld.c file.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12236 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
Theodore Ateba 2018-09-04 11:50:42 +00:00
parent 5903f8305c
commit 1b70b67405
1 changed files with 22 additions and 22 deletions

View File

@ -189,10 +189,10 @@ void cry_lld_stop(CRYDriver *cryp) {
* *
* @notapi * @notapi
*/ */
cryerror_t cry_lld_loadkey(CRYDriver *cryp, cryerror_t cry_lld_loadkey(CRYDriver *cryp,
cryalgorithm_t algorithm, cryalgorithm_t algorithm,
size_t size, size_t size,
const uint8_t *keyp) { const uint8_t *keyp) {
uint8_t i; uint8_t i;
@ -237,10 +237,10 @@ cryerror_t cry_lld_loadkey(CRYDriver *cryp,
* *
* @notapi * @notapi
*/ */
cryerror_t cry_lld_encrypt_AES(CRYDriver *cryp, cryerror_t cry_lld_encrypt_AES(CRYDriver *cryp,
crykey_t key_id, crykey_t key_id,
const uint8_t *src, const uint8_t *src,
uint8_t *dest) { uint8_t *dest) {
uint8_t i; uint8_t i;
(void)cryp; (void)cryp;
@ -259,18 +259,18 @@ cryerror_t cry_lld_encrypt_AES(CRYDriver *cryp,
/* Wait the Encryption to finish or an error to occurs. */ /* Wait the Encryption to finish or an error to occurs. */
do{ do{
} }
while ((AES.STATUS & (AES_SRIF_bm|AES_ERROR_bm)) == 0); while ((AES.STATUS & (AES_SRIF_bm|AES_ERROR_bm)) == 0);
/* Check error. */ /* Check error. */
if((AES.STATUS & AES_ERROR_bm) == 0) { if((AES.STATUS & AES_ERROR_bm) == 0) {
/* Store the result of the encryption. */ /* Store the result of the encryption. */
for(i = 0; i < AES_BLOCK_SIZE; i++) { for(i = 0; i < AES_BLOCK_SIZE; i++) {
dest[i] = AES.STATE; dest[i] = AES.STATE;
} }
} }
else { else {
return CRY_ERR_OP_FAILURE; return CRY_ERR_OP_FAILURE;
} }
return CRY_NOERROR; return CRY_NOERROR;
@ -297,10 +297,10 @@ cryerror_t cry_lld_encrypt_AES(CRYDriver *cryp,
* *
* @notapi * @notapi
*/ */
cryerror_t cry_lld_decrypt_AES(CRYDriver *cryp, cryerror_t cry_lld_decrypt_AES(CRYDriver *cryp,
crykey_t key_id, crykey_t key_id,
const uint8_t *src, const uint8_t *src,
uint8_t *dest) { uint8_t *dest) {
uint8_t i; uint8_t i;
@ -308,8 +308,8 @@ cryerror_t cry_lld_decrypt_AES(CRYDriver *cryp,
(void)key_id; (void)key_id;
/* Load data into AES state memory. */ /* Load data into AES state memory. */
for (i = 0; i < AES_BLOCK_SIZE; i++) { for (i = 0; i < AES_BLOCK_SIZE; i++) {
AES.STATE = src[i]; AES.STATE = src[i];
} }
/* Set the AES decryption mode. */ /* Set the AES decryption mode. */