Std.Crypto
29 public declarations
- blake2b256
&Bytes -> BytesThe BLAKE2b digest of bytes at 32 bytes.
- blake2b512
&Bytes -> BytesThe BLAKE2b digest of bytes at 64 bytes.
- bytesMatch
&Bytes -> &Bytes -> BoolWhether two byte sequences are equal, in time that depends only on their
- derive
&Bytes -> &Bytes -> Int -> Int -> BytesA key derived from a password, slowly and on purpose.
- Digest
A SHA-256 digest: eight words, which is the form the algorithm produces.
- digestsMatch
&Std.Crypto.Digest -> &Std.Crypto.Digest -> BoolWhether two digests are the same, compared in constant time.
- hmacSha256
&Bytes -> &Bytes -> BytesThe keyed digest that proves who a message came from.
- hmacSha256Text
Str -> Str -> BytesThe same, over text taken as UTF-8.
- hmacSha512
&Bytes -> &Bytes -> BytesThe keyed digest over SHA-512, for protocols defined over it.
- keyLength
IntHow long a key for `seal` must be, in bytes.
- legacyBytes
&Std.Crypto.LegacyDigest -> Array[UInt32]A legacy digest as the bytes it is, for a protocol that encodes them.
- LegacyDigest
A SHA-1 digest: five words, which is the form that algorithm produces.
- legacyHex
&Std.Crypto.LegacyDigest -> StrA legacy digest written as lower-case hexadecimal.
- newKey
Result[Bytes, Str]A fresh key of the length `seal` needs, from the operating system's secure
- newNonce
Result[Bytes, Str]A fresh nonce of the length `seal` needs, from the same secure source.
- nonceLength
IntHow long a nonce for `seal` must be, in bytes.
- open
&Bytes -> &Bytes -> &Bytes -> &Bytes -> Option[Bytes]Open a sealed message, or answer nothing.
- seal
&Bytes -> &Bytes -> &Bytes -> &Bytes -> Option[Bytes]Encrypt a message so that changing it is detected.
- secretsMatch
Str -> Str -> BoolWhether two texts are the same, compared in constant time.
- sha1
Str -> Std.Crypto.LegacyDigestThe SHA-1 digest of text, taken over its UTF-8 bytes.
- sha1Bytes
&Array[UInt32] -> Std.Crypto.LegacyDigestThe SHA-1 digest of bytes.
- sha256
Str -> Std.Crypto.DigestThe SHA-256 digest of text, taken over its UTF-8 bytes.
- sha256Bytes
&Array[UInt32] -> Std.Crypto.DigestThe SHA-256 digest of bytes.
- sha256Hex
Str -> StrThe SHA-256 of text, rendered as hexadecimal in one step.
- sha3_256
&Bytes -> BytesThe SHA3-256 digest of bytes.
- sha3_512
&Bytes -> BytesThe SHA3-512 digest of bytes.
- sha512
&Bytes -> BytesThe SHA-512 digest of bytes.
- toHex
&Std.Crypto.Digest -> StrA digest written as lower-case hexadecimal, which is how one is quoted.
- utf8
Str -> Array[UInt32]Text as UTF-8 bytes.
