crypto_box_keypair - rename arguments to pk,sk
This commit is contained in:
parent
92aee452df
commit
49587c3d7f
10
index.js
10
index.js
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user