crypto#HexBase64Latin1Encoding TypeScript Examples
The following examples show how to use
crypto#HexBase64Latin1Encoding.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: aws-signature-v4.ts From aws-transcribe with MIT License | 4 votes |
function hmac(key: string, string: string, encoding?: HexBase64Latin1Encoding) {
return crypto
.createHmac("sha256", key)
.update(string, "utf8")
.digest(encoding as any)
}
Example #2
Source File: aws-signature-v4.ts From aws-transcribe with MIT License | 4 votes |
function hash(string: string, encoding: HexBase64Latin1Encoding) {
return crypto.createHash("sha256").update(string, "utf8").digest(encoding)
}