summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorBenjamin Beurdouche <bbeurdouche@mozilla.com>2021-03-10 10:42:34 +0000
committerBenjamin Beurdouche <bbeurdouche@mozilla.com>2021-03-10 10:42:34 +0000
commit0e243256eae5c41609f49f7c502c8ece4d002eba (patch)
tree4ab9d0b6104cd62f83c7d333f1890ee05dde7f35 /cmd
parent45c7b75d5d2d873b117b06c0a551666e7ccc46d2 (diff)
downloadnss-hg-0e243256eae5c41609f49f7c502c8ece4d002eba.tar.gz
Bug 1613235 - Clang-format for: POWER ChaCha20 stream cipher vector acceleration r=beurdoucheNSS_3_63_BETA1
Depends on D107221 Differential Revision: https://phabricator.services.mozilla.com/D107788
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bltest/blapitest.c13
1 files changed, 6 insertions, 7 deletions
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