From 0e243256eae5c41609f49f7c502c8ece4d002eba Mon Sep 17 00:00:00 2001 From: Benjamin Beurdouche Date: Wed, 10 Mar 2021 10:42:34 +0000 Subject: Bug 1613235 - Clang-format for: POWER ChaCha20 stream cipher vector acceleration r=beurdouche Depends on D107221 Differential Revision: https://phabricator.services.mozilla.com/D107788 --- cmd/bltest/blapitest.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'cmd') diff --git a/cmd/bltest/blapitest.c b/cmd/bltest/blapitest.c index 76b9494f0..98e7c7538 100644 --- a/cmd/bltest/blapitest.c +++ b/cmd/bltest/blapitest.c @@ -803,7 +803,7 @@ struct bltestCipherInfoStr { PRBool is_symmkeyCipher(bltestCipherMode mode) { -/* change as needed! */ + /* change as needed! */ if (mode >= bltestDES_ECB && mode <= bltestCHACHA20_CTR) return PR_TRUE; return PR_FALSE; @@ -1153,8 +1153,8 @@ aes_Decrypt(void *cx, unsigned char *output, unsigned int *outputLen, SECStatus chacha20_Encrypt(void *cx, unsigned char *output, unsigned int *outputLen, - unsigned int maxOutputLen, const unsigned char *input, - unsigned int inputLen) + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) { if (maxOutputLen < inputLen) { PORT_SetError(SEC_ERROR_OUTPUT_LEN); @@ -1164,7 +1164,6 @@ chacha20_Encrypt(void *cx, unsigned char *output, unsigned int *outputLen, *outputLen = inputLen; return ChaCha20_Xor(output, input, inputLen, ctx->key, ctx->nonce, ctx->counter); - } SECStatus @@ -1681,7 +1680,7 @@ bltest_chacha20_ctr_init(bltestCipherInfo *cipherInfo, PRBool encrypt) sk->iv.buf.data, sk->iv.buf.len, counter); - if (cipherInfo->cx == NULL){ + if (cipherInfo->cx == NULL) { PR_fprintf(PR_STDERR, "ChaCha20_CreateContext() returned NULL\n" "key must be 32 bytes, iv must be 12 bytes\n"); return SECFailure; @@ -2749,10 +2748,10 @@ getHighUnitBytes(PRInt64 res) } } - if (i==0) + if (i == 0) return PR_smprintf("%d%s", spl[i], marks[i]); else - return PR_smprintf("%d%s %d%s", spl[i], marks[i], spl[i-1], marks[i-1]); + return PR_smprintf("%d%s %d%s", spl[i], marks[i], spl[i - 1], marks[i - 1]); } static void -- cgit v1.2.1