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
}
function crypto_box_keypair(x, y) {
check(x, crypto_box_PUBLICKEYBYTES)
check(y, crypto_box_SECRETKEYBYTES)
randombytes(x, 32);
return crypto_scalarmult_base(y, x);
function crypto_box_keypair(pk, sk) {
check(pk, crypto_box_PUBLICKEYBYTES)
check(sk, crypto_box_SECRETKEYBYTES)
randombytes(pk, 32);
return crypto_scalarmult_base(sk, pk);
}
var crypto_secretbox_KEYBYTES = 32,