External module "lib/util/encryption"
Functions
HKDF
- HKDF(hashAlg: string, salt: Buffer, ikm: Buffer, info: Buffer, size: number): Buffer
-
Parameters
-
hashAlg: string
-
salt: Buffer
-
ikm: Buffer
-
info: Buffer
-
size: number
Returns Buffer
computePoly1305
- computePoly1305(cipherText: Buffer, AAD: Buffer, nonce: Buffer, key: Buffer): Buffer
-
Parameters
-
cipherText: Buffer
-
AAD: Buffer
-
nonce: Buffer
-
key: Buffer
Returns Buffer
encryptAndSeal
- encryptAndSeal(plainText: Buffer, AAD: Buffer, nonce: Buffer, key: Buffer): Buffer[]
-
Parameters
-
plainText: Buffer
-
AAD: Buffer
-
nonce: Buffer
-
key: Buffer
Returns Buffer[]
getPadding
- getPadding(buffer: any, blockSize: any): Buffer
-
Parameters
-
buffer: any
-
blockSize: any
Returns Buffer
verifyAndDecrypt
- verifyAndDecrypt(cipherText: Buffer, mac: Buffer, AAD: Buffer, nonce: Buffer, key: Buffer): Buffer
-
Parameters
-
cipherText: Buffer
-
mac: Buffer
-
AAD: Buffer
-
nonce: Buffer
-
key: Buffer
Returns Buffer