Nits
This commit is contained in:
parent
d333f509a2
commit
bdfda5dc83
@ -15,7 +15,7 @@ tv_kdf(void)
|
|||||||
context = (char *) sodium_malloc(crypto_kdf_CONTEXTBYTES);
|
context = (char *) sodium_malloc(crypto_kdf_CONTEXTBYTES);
|
||||||
master_key = (unsigned char *) sodium_malloc(crypto_kdf_KEYBYTES);
|
master_key = (unsigned char *) sodium_malloc(crypto_kdf_KEYBYTES);
|
||||||
|
|
||||||
memcpy(context, "KDF test", strlen("KDF test"));
|
memcpy(context, "KDF test", sizeof "KDF test" -1U);
|
||||||
for (i = 0; i < crypto_kdf_KEYBYTES; i++) {
|
for (i = 0; i < crypto_kdf_KEYBYTES; i++) {
|
||||||
master_key[i] = i;
|
master_key[i] = i;
|
||||||
}
|
}
|
||||||
|
@ -1259,7 +1259,7 @@ int main(void)
|
|||||||
}
|
}
|
||||||
sodium_hex2bin(sk, crypto_sign_SECRETKEYBYTES,
|
sodium_hex2bin(sk, crypto_sign_SECRETKEYBYTES,
|
||||||
"833fe62409237b9d62ec77587520911e9a759cec1d19755b7da901b96dca3d42",
|
"833fe62409237b9d62ec77587520911e9a759cec1d19755b7da901b96dca3d42",
|
||||||
2 * crypto_sign_SECRETKEYBYTES , NULL, NULL, NULL);
|
2 * crypto_sign_SECRETKEYBYTES / 2, NULL, NULL, NULL);
|
||||||
sodium_hex2bin(pk, crypto_sign_PUBLICKEYBYTES,
|
sodium_hex2bin(pk, crypto_sign_PUBLICKEYBYTES,
|
||||||
"ec172b93ad5e563bf4932c70e1245034c35467ef2efd4d64ebf819683467e2bf",
|
"ec172b93ad5e563bf4932c70e1245034c35467ef2efd4d64ebf819683467e2bf",
|
||||||
2 * crypto_sign_PUBLICKEYBYTES, NULL, NULL, NULL);
|
2 * crypto_sign_PUBLICKEYBYTES, NULL, NULL, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user