This package provides functions to compute SHA-256 and SHA-512 hashes using native Node crypto.
- full docs on jsr.io
- Hash (SHA-256 or SHA-512)
- HMAC (SHA-256 or SHA-512)
- generate default keys
- generate key
You can generate default keys for common key sizes by running the following command:
deno run jsr:@frytg/crypto/generate-default-keys
The output will be printed to the console.
Those can be used with HMAC or encryption key usage. Google Cloud Storage for example uses 32 byte keys (in base64) for customer-supplied encryption keys.
For SHA-256 the recommended key size is 32 bytes (256 bits) and for SHA-512 it is 64 bytes (512 bits) (see RFC 2104 - section 2 and 3).
Created by @frytg / frytg.digital
Unlicense - also see unlicense.org