A fresh copy of the bytes (16–32); mutating it does not change the secret.
The length in bytes.
StaticisType guard for a Secret, including one from another copy of this package.
StaticfromA validated copy of bytes. The copy is taken first, so the checks and
the secret see the same bytes (a Buffer is accepted; its slice
would alias).
InvalidParameter unless bytes is a Uint8Array
(text goes through Secret.fromText); then SecretTooShort,
SecretTooLong, SecretLengthNotEven, in that order.
StaticfromThe UTF-8 bytes of text, validated as from (the reference's
Secret::new(&str)). A lone surrogate, which &str cannot hold, is
encoded as U+FFFD.
Same bytes; false for anything that is not a Secret (one from another copy of this package compares by its bytes).
A new Secret with the same bytes.
A validated secret: 16–32 bytes, even length. Holds its own copy and hands out copies; nothing outside can change it.