do not export STORE64_LE
This commit is contained in:
parent
813481c350
commit
85bba731c0
@ -8,7 +8,6 @@ module.exports.crypto_kdf_BYTES_MIN = 16
|
|||||||
module.exports.crypto_kdf_BYTES_MAX = 64
|
module.exports.crypto_kdf_BYTES_MAX = 64
|
||||||
module.exports.crypto_kdf_CONTEXTBYTES = 8
|
module.exports.crypto_kdf_CONTEXTBYTES = 8
|
||||||
module.exports.crypto_kdf_KEYBYTES = 32
|
module.exports.crypto_kdf_KEYBYTES = 32
|
||||||
module.exports.STORE64_LE = STORE64_LE
|
|
||||||
|
|
||||||
function STORE64_LE (dest, int) {
|
function STORE64_LE (dest, int) {
|
||||||
var mul = 1
|
var mul = 1
|
||||||
|
@ -10,7 +10,6 @@ const {
|
|||||||
} = require('./crypto_stream_chacha20')
|
} = require('./crypto_stream_chacha20')
|
||||||
const { crypto_core_hchacha20, crypto_core_hchacha20_INPUTBYTES } = require('./internal/hchacha20')
|
const { crypto_core_hchacha20, crypto_core_hchacha20_INPUTBYTES } = require('./internal/hchacha20')
|
||||||
const Poly1305 = require('./internal/poly1305')
|
const Poly1305 = require('./internal/poly1305')
|
||||||
const { STORE64_LE } = require('./crypto_kdf')
|
|
||||||
const { sodium_increment, sodium_is_zero, sodium_memcmp } = require('./helpers')
|
const { sodium_increment, sodium_is_zero, sodium_memcmp } = require('./helpers')
|
||||||
|
|
||||||
const crypto_onetimeauth_poly1305_BYTES = 16
|
const crypto_onetimeauth_poly1305_BYTES = 16
|
||||||
@ -35,11 +34,12 @@ const crypto_secretstream_xchacha20poly1305_TAG_FINAL = crypto_secretstream_xcha
|
|||||||
|
|
||||||
const _pad0 = new Uint8Array(16)
|
const _pad0 = new Uint8Array(16)
|
||||||
|
|
||||||
class Crypto_secretstream_xchacha20poly1305_state {
|
function STORE64_LE (dest, int) {
|
||||||
constructor () {
|
let mul = 1
|
||||||
this.k = new Uint8Array(crypto_stream_chacha20_ietf_KEYBYTES)
|
let i = 0
|
||||||
this.nonce = new Uint8Array(crypto_stream_chacha20_ietf_NONCEBYTES)
|
dest[0] = int & 0xFF
|
||||||
this.pad = new Uint8Array(8)
|
while (++i < 8 && (mul *= 0x100)) {
|
||||||
|
dest[i] = (int / mul) & 0xFF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user