Expand description
Encodings of binary data such as Base64 and Hex.
§Example
assert_eq!(Hex::encode("Hello world!"), "48656c6c6f20776f726c6421");
assert_eq!(Hex::encode_with_format("Hello world!"), "0x48656c6c6f20776f726c6421");
assert_eq!(Base64::encode("Hello world!"), "SGVsbG8gd29ybGQh");
assert_eq!(Base58::encode("Hello world!"), "2NEpo7TZRhna7vSvL");Structs§
Traits§
- Encoding
- Trait representing a general binary-to-string encoding.
Functions§
- decode_
bytes_ hex - Decodes a hex string to bytes. Both upper and lower case characters are allowed in the hex string.