pub fn decode_prefixed(expected: Tag, s: &str) -> Result<Zeroizing<Vec<u8>>>Expand description
Decode a tag_<hexbody>_<hexchecksum> string, verifying both the tag
and the checksum, and return the raw payload bytes.
The returned bytes are wrapped in Zeroizing so that decoding a
secret key does not leave a readable copy on the heap once the caller
is done with it.
Errors:
Error::InvalidPrefixif the string is not in three-part shape, or its tag is not the one expected for this type;Error::InvalidHexif the body or checksum part is not hex;Error::InvalidChecksumif the checksum is the wrong length or does not match the recomputed value.