crypto_box_keypair - rename arguments to pk,sk

This commit is contained in:
Daniel Regeci 2018-03-18 11:36:26 +07:00 committed by Emil Bay
parent 92aee452df
commit 49587c3d7f

View File

@ -1736,11 +1736,11 @@ function crypto_secretbox_open_easy(msg, box, n, k) {
return true return true
} }
function crypto_box_keypair(x, y) { function crypto_box_keypair(pk, sk) {
check(x, crypto_box_PUBLICKEYBYTES) check(pk, crypto_box_PUBLICKEYBYTES)
check(y, crypto_box_SECRETKEYBYTES) check(sk, crypto_box_SECRETKEYBYTES)
randombytes(x, 32); randombytes(pk, 32);
return crypto_scalarmult_base(y, x); return crypto_scalarmult_base(sk, pk);
} }
var crypto_secretbox_KEYBYTES = 32, var crypto_secretbox_KEYBYTES = 32,