pub fn load_key(id: &KeyId) -> Result<SecretKey, KeyError>Expand description
Reads the material one locally resolvable key identity names.
file:<path> reads the file; env:<NAME> reads an environment variable.
Both accept 32 raw bytes or 64 hexadecimal characters, with surrounding
whitespace ignored so a key file written by printf or by an editor that
appends a newline both work.
KMS schemes (awskms:, gcpkms:, vault:) are resolved by their own
keyring implementations, not here, and are reported as unsupported rather
than silently treated as a path.
ยงErrors
Returns KeyError when the scheme is not locally resolvable, the source
cannot be read, or it does not hold 256 bits.