Module: orc/utils

Source:

Methods


<static> createCipher(password, salt, iv)

Returns a cipher stream using aes-256-cbc
Parameters:
Name Type Description
password buffer
salt buffer
iv buffer
Source:
Returns:
Type
Cipher

<static> createDecipher(password, salt, iv)

Returns a decipher stream using aes-256-cbc
Parameters:
Name Type Description
password buffer
salt buffer
iv buffer
Source:
Returns:
Type
Cipher

<static> decrypt(data, password, salt, iv)

Parameters:
Name Type Description
data buffer
password buffer
salt buffer
iv buffer
Source:
Returns:
Type
buffer

<static> encrypt(data, password, salt, iv)

Parameters:
Name Type Description
data buffer
password buffer
salt buffer
iv buffer
Source:
Returns:
Type
buffer

<static> splitBufferByBytes(buffer)

Splits a buffer into N buffers given a byte size
Parameters:
Name Type Description
buffer buffer
Source:
Returns:
Type
Array.<buffer>