crypto_sign
: replace Buffer.alloc()
with new Uint8Array()
(#62)
This commit is contained in:
parent
87ff2a56bd
commit
25c97802f4
@ -452,7 +452,7 @@ function crypto_sign_ed25519_sk_to_curve25519 (curveSk, edSk) {
|
|||||||
assert(curveSk && curveSk.byteLength === crypto_scalarmult_BYTES, "curveSk must be 'crypto_sign_SECRETKEYBYTES' long")
|
assert(curveSk && curveSk.byteLength === crypto_scalarmult_BYTES, "curveSk must be 'crypto_sign_SECRETKEYBYTES' long")
|
||||||
assert(edSk && edSk.byteLength === crypto_sign_ed25519_SECRETKEYBYTES, "edSk must be 'crypto_sign_ed25519_SECRETKEYBYTES' long")
|
assert(edSk && edSk.byteLength === crypto_sign_ed25519_SECRETKEYBYTES, "edSk must be 'crypto_sign_ed25519_SECRETKEYBYTES' long")
|
||||||
|
|
||||||
var h = Buffer.alloc(crypto_hash_sha512_BYTES)
|
var h = new Uint8Array(crypto_hash_sha512_BYTES)
|
||||||
crypto_hash(h, edSk, 32)
|
crypto_hash(h, edSk, 32)
|
||||||
|
|
||||||
h[0] &= 248
|
h[0] &= 248
|
||||||
|
Loading…
Reference in New Issue
Block a user