@highoutput/hash
v0.1.11
Published
## `hash(message[,algorithm][,salt])` * `message` `(string|Buffer)` Input message * `opts.algorithm` `(string)` Algorithm * `opts.salt` `(string|Buffer)` * `opts.salt` `(string|Buffer)` * Returns: `(Promise<Buffer>)`
Downloads
8
Keywords
Readme
@highoutput/hash
hash(message[,algorithm][,salt])
message
(string|Buffer)
Input messageopts.algorithm
(string)
Algorithmopts.salt
(string|Buffer)
opts.salt
(string|Buffer)
- Returns:
(Promise<Buffer>)
Generate hash.
Examples
import { hash } from 'highoutput-utilities';
hash('The quick brown fox jumps over the lazy dog.');
hash('The quick brown fox jumps over the lazy dog.', { algorithm: 'sha256' });
hash('The quick brown fox jumps over the lazy dog.', { algorithm: 'sha256', salt: 'secretsalt' });