[177:14] (extern: com.lehman.aussomserver.connectors.AussomDigest) extends: object
Streaming digest object backed by java.security.MessageDigest. Use this when input arrives in chunks; for one-shot digests prefer the static codec helpers. After digest() the underlying state resets so the same object can be reused.
Digest (string Algorithm)
Constructs a new Digest object for the given algorithm.
Algorithm is a string with the algorithm name. Accepts "MD5", "SHA-1", "SHA-256", "SHA-384", "SHA-512", and the unhyphenated forms.This Digest object.newDigest (string Algorithm)
update (Data)
Feeds a chunk of data into the digest.
Data is a string (UTF-8) or Buffer to feed.This Digest object.updateFile (string Path)
Feeds the bytes of a file into the digest, streamed in 8 KiB chunks.
Path is a string with the file path.This Digest object.digest ()
Finalizes and returns the raw digest as a Buffer. After this call the underlying state is reset and the object is ready for fresh update calls.
A Buffer with the raw digest bytes.reset ()
Discards accumulated state without producing a digest.
This Digest object.getAlgorithm ()
Returns the resolved JCE algorithm name as a string.
A string with the algorithm name.[231:14] (extern: com.lehman.aussomserver.connectors.AussomHmac) extends: object
Streaming HMAC object backed by javax.crypto.Mac. The key is supplied to the constructor and retained, so digest() can be called repeatedly under the same key on fresh data.
Hmac (string Algorithm, Key)
Constructs a new Hmac object for the given algorithm and key.
Algorithm is a string with the algorithm name. Accepts "SHA-1", "SHA-256", "SHA-384", "SHA-512", "HmacSHA256", etc.Key is a string (UTF-8) or Buffer with the shared secret.This Hmac object.newHmac (string Algorithm, Key)
update (Data)
Feeds a chunk of data into the MAC.
Data is a string (UTF-8) or Buffer to feed.This Hmac object.updateFile (string Path)
Feeds the bytes of a file into the MAC, streamed in 8 KiB chunks.
Path is a string with the file path.This Hmac object.digest ()
Finalizes and returns the raw HMAC tag as a Buffer. After this call the MAC is reset and ready for fresh update calls under the same key.
A Buffer with the raw HMAC tag bytes.reset ()
Discards accumulated state without producing a tag.
This Hmac object.getAlgorithm ()
Returns the resolved JCE algorithm name as a string.
A string with the algorithm name.[25:21] static (extern: com.lehman.aussomserver.connectors.AussomCodec) extends: object
The static codec class provides one-shot SHA / MD5 digest and HMAC-SHA functions over strings, Buffer payloads, and files. Digests are returned as raw Buffer objects; pipe through hex.encode(...) or base64.encode(...) for text output. For chunked input use the Digest and Hmac extern classes.
sha1 (Data)
Computes the SHA-1 digest of the provided data.
Data is a string (UTF-8) or Buffer to digest.A Buffer with the raw digest bytes.sha256 (Data)
Computes the SHA-256 digest of the provided data.
Data is a string (UTF-8) or Buffer to digest.A Buffer with the raw digest bytes.sha384 (Data)
Computes the SHA-384 digest of the provided data.
Data is a string (UTF-8) or Buffer to digest.A Buffer with the raw digest bytes.sha512 (Data)
Computes the SHA-512 digest of the provided data.
Data is a string (UTF-8) or Buffer to digest.A Buffer with the raw digest bytes.md5 (Data)
Computes the MD5 digest of the provided data. MD5 is for legacy interop only; do not use it for signing.
Data is a string (UTF-8) or Buffer to digest.A Buffer with the raw digest bytes.sha1File (string Path)
Computes the SHA-1 digest of a file, streamed.
Path is a string with the file path.A Buffer with the raw digest bytes.sha256File (string Path)
Computes the SHA-256 digest of a file, streamed.
Path is a string with the file path.A Buffer with the raw digest bytes.sha384File (string Path)
Computes the SHA-384 digest of a file, streamed.
Path is a string with the file path.A Buffer with the raw digest bytes.sha512File (string Path)
Computes the SHA-512 digest of a file, streamed.
Path is a string with the file path.A Buffer with the raw digest bytes.md5File (string Path)
Computes the MD5 digest of a file, streamed. MD5 is for legacy interop only; do not use it for signing.
Path is a string with the file path.A Buffer with the raw digest bytes.hmacSha1 (Data, Key)
Computes the HMAC-SHA1 tag of the provided data under the provided key.
Data is a string (UTF-8) or Buffer to authenticate.Key is a string (UTF-8) or Buffer with the shared secret.A Buffer with the raw HMAC tag bytes.hmacSha256 (Data, Key)
Computes the HMAC-SHA256 tag of the provided data under the provided key.
Data is a string (UTF-8) or Buffer to authenticate.Key is a string (UTF-8) or Buffer with the shared secret.A Buffer with the raw HMAC tag bytes.hmacSha384 (Data, Key)
Computes the HMAC-SHA384 tag of the provided data under the provided key.
Data is a string (UTF-8) or Buffer to authenticate.Key is a string (UTF-8) or Buffer with the shared secret.A Buffer with the raw HMAC tag bytes.hmacSha512 (Data, Key)
Computes the HMAC-SHA512 tag of the provided data under the provided key.
Data is a string (UTF-8) or Buffer to authenticate.Key is a string (UTF-8) or Buffer with the shared secret.A Buffer with the raw HMAC tag bytes.hmacSha1File (string Path, Key)
Computes the HMAC-SHA1 tag of a file under the provided key, streamed.
Path is a string with the file path.Key is a string (UTF-8) or Buffer with the shared secret.A Buffer with the raw HMAC tag bytes.hmacSha256File (string Path, Key)
Computes the HMAC-SHA256 tag of a file under the provided key, streamed.
Path is a string with the file path.Key is a string (UTF-8) or Buffer with the shared secret.A Buffer with the raw HMAC tag bytes.hmacSha384File (string Path, Key)
Computes the HMAC-SHA384 tag of a file under the provided key, streamed.
Path is a string with the file path.Key is a string (UTF-8) or Buffer with the shared secret.A Buffer with the raw HMAC tag bytes.hmacSha512File (string Path, Key)
Computes the HMAC-SHA512 tag of a file under the provided key, streamed.
Path is a string with the file path.Key is a string (UTF-8) or Buffer with the shared secret.A Buffer with the raw HMAC tag bytes.