CryptoUtil
CryptoUtil~createHash(algorithm, data, [encoding], output) ⇒ Buffer | string
Creates a new hash by given algorithm, data and digest encoding. Defaults to sha256.
Kind: inner method of CryptoUtil
Returns: Buffer | string - if {output} is undefined, a {Buffer} is returned, otherwise a
| Param | Type | Description |
|---|---|---|
| algorithm | string | the hash algorithm, default is 'sha256' |
| data | Buffer | string | TypedArray | DataView | the data to hash |
| [encoding] | string | optional, the encoding of the input |
| output | 'base64' | 'base64url' | 'binary' | 'hex' | undefined | optional, the desired output type |