Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.73 KB

README.md

File metadata and controls

35 lines (22 loc) · 1.73 KB

Crypto utilities

JSR @frytg/crypto ci

This package provides functions to compute SHA-256 and SHA-512 hashes using native Node crypto.

Generate default keys

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).

Author

Created by @frytg / frytg.digital

License

Unlicense - also see unlicense.org