Skip to main content

Crypto

import { base64Decode, base64Encode, hashString } from '@rtorcato/js-common/crypto'

Exports

NameSummary
base64DecodeDecodes a base64 string.
base64EncodeEncodes a string to base64.
hashStringHashes a string using the specified algorithm.
hmacHashCreates an HMAC hash of a string using a secret and algorithm.
randomHexGenerates a random hex string of the specified length (in bytes).