HashSetJS
|
Classes | |
class | HashSet |
Functions | |
function | crypto_hash (s, algorithm) |
function | strip_str (s, d='') |
function | sha256_str (s) |
function | sha256_csv (s) |
function | sha256_tsv (s) |
function | sha512_str (s) |
function | sha512_csv (s) |
function | sha512_tsv (s) |
Variables | |
const | crypto = require('crypto') |
const | fs = require('fs') |
const | HASHSETJS_VERSION = '1.0.3' |
const | HASH_FUNCTIONS |
const | HASH_LENGTHS |
function crypto_hash | ( | s | , |
algorithm | |||
) |
Helper wrapper to compute various hash algorithms on a String
.
{String} | s - The String on which the hash will be computed. |
{String} | algorithm - The hash algorithm to compute. |
s
as a binary string. function sha256_csv | ( | s | ) |
Wrapper to compute SHA256 on a String
, stripping whitespace around commas.
{String} | s - The String on which the SHA256 will be computed. |
s
after stripping whitespace around commas. function sha256_str | ( | s | ) |
Wrapper to compute SHA256 on a String
.
{String} | s - The String on which the SHA256 will be computed. |
s
as a binary string. function sha256_tsv | ( | s | ) |
Wrapper to compute SHA256 on a String
, stripping whitespace around tabs.
{String} | s - The String on which the SHA256 will be computed. |
s
after stripping whitespace around tabs. function sha512_csv | ( | s | ) |
Wrapper to compute SHA512 on a String
, stripping whitespace around commas.
{String} | s - The String on which the SHA512 will be computed. |
s
after stripping whitespace around commas. function sha512_str | ( | s | ) |
Wrapper to compute SHA512 on a String
.
{String} | s - The String on which the SHA512 will be computed. |
s
as a binary string. function sha512_tsv | ( | s | ) |
Wrapper to compute SHA512 on a String
, stripping whitespace around tabs.
{String} | s - The String on which the SHA512 will be computed. |
s
after stripping whitespace around tabs. function strip_str | ( | s | , |
d | = '' |
||
) |
Helper function to strip whitespace in a given String
(e.g. prior to computing a hash).
{String} | s - The String to strip. |
{String} | d - An optional delimiter around which to also strip whitespace. |
s
. const crypto = require('crypto') |
const fs = require('fs') |
const HASH_FUNCTIONS |
const HASH_LENGTHS |
const HASHSETJS_VERSION = '1.0.3' |