Interfaces

Cipher
CredentialDetails
Credentials
Decipher
DiffieHellman
Hash
Hmac
Signer
Verify

Methods

SM createCipher(algorithm: string, password: any) crypto.Cipher

Parameters:
Name Type
algorithm string
password any
Returns: { crypto.Cipher }

SM createCipheriv(algorithm: string, key: any, iv: any) crypto.Cipher

Parameters:
Name Type
algorithm string
key any
iv any
Returns: { crypto.Cipher }

SM createCredentials(details: crypto.CredentialDetails) crypto.Credentials

Parameters:
Name Type
details crypto.CredentialDetails
Returns: { crypto.Credentials }

SM createDecipher(algorithm: string, password: any) crypto.Decipher

Parameters:
Name Type
algorithm string
password any
Returns: { crypto.Decipher }

SM createDecipheriv(algorithm: string, key: any, iv: any) crypto.Decipher

Parameters:
Name Type
algorithm string
key any
iv any
Returns: { crypto.Decipher }

SM createDiffieHellman(prime_length: number) crypto.DiffieHellman

Parameters:
Name Type
prime_length number
Returns: { crypto.DiffieHellman }

SM createDiffieHellman(prime: number, encoding: string) crypto.DiffieHellman

Parameters:
Name Type Argument
prime number
encoding string <optional>
Returns: { crypto.DiffieHellman }

SM createHash(algorithm: string) crypto.Hash

Parameters:
Name Type
algorithm string
Returns: { crypto.Hash }

SM createHmac(algorithm: string, key: string) crypto.Hmac

Parameters:
Name Type
algorithm string
key string
Returns: { crypto.Hmac }

SM createHmac(algorithm: string, key: Buffer) crypto.Hmac

Parameters:
Name Type
algorithm string
key Buffer
Returns: { crypto.Hmac }

SM createSign(algorithm: string) crypto.Signer

Parameters:
Name Type
algorithm string
Returns: { crypto.Signer }

SM createVerify(algorith: string) crypto.Verify

Parameters:
Name Type
algorith string
Returns: { crypto.Verify }

SM getDiffieHellman(group_name: string) crypto.DiffieHellman

Parameters:
Name Type
group_name string
Returns: { crypto.DiffieHellman }

SM pbkdf2(password: string, salt: string, iterations: number, keylen: number, callback: module:crypto.Pbkdf2CallbackCallback) void

Parameters:
Name Type
password string
salt string
iterations number
keylen number
callback module:crypto.Pbkdf2CallbackCallback
Returns: { void }

SM pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number) Buffer

Parameters:
Name Type
password string
salt string
iterations number
keylen number
Returns: { Buffer }

SM pseudoRandomBytes(size: number) Buffer

Parameters:
Name Type
size number
Returns: { Buffer }

SM pseudoRandomBytes(size: number, callback: module:crypto.PseudoRandomBytesCallbackCallback) void

Parameters:
Name Type
size number
callback module:crypto.PseudoRandomBytesCallbackCallback
Returns: { void }

SM randomBytes(size: number) Buffer

Parameters:
Name Type
size number
Returns: { Buffer }

SM randomBytes(size: number, callback: module:crypto.RandomBytesCallbackCallback) void

Parameters:
Name Type
size number
callback module:crypto.RandomBytesCallbackCallback
Returns: { void }

Callbacks

Pbkdf2CallbackCallback(err: Error, derivedKey: Buffer) any

Parameters:
Name Type
err Error
derivedKey Buffer
Returns: { any }

PseudoRandomBytesCallbackCallback(err: Error, buf: Buffer) void

Parameters:
Name Type
err Error
buf Buffer
Returns: { void }

RandomBytesCallbackCallback(err: Error, buf: Buffer) void

Parameters:
Name Type
err Error
buf Buffer
Returns: { void }