pub fn f4jumble_inv(message: &[u8]) -> Result<Vec<u8>, Error>
Available on crate feature
alloc
only.Expand description
Decodes the given message using F4Jumble⁻¹, and returns the decoded message as a vector of bytes.
Returns an error if the message is an invalid length.
§Examples
let encoded_a = hex::decode(
"861c51ee746b0313476967a3483e7e1ff77a2952a17d3ed9e0ab0f502e1179430322da9967b613545b1c36353046ca27")
.unwrap();
let message_a = f4jumble::f4jumble_inv(&encoded_a).unwrap();
assert_eq!(message_a, b"The package from Alice arrives tomorrow morning.");
let encoded_b = hex::decode(
"af1d55f2695aea02440867bbbfae3b08e8da55b625de3fa91432ab7b2c0a7dff9033ee666db1513ba5761ef482919fb8")
.unwrap();
let message_b = f4jumble::f4jumble_inv(&encoded_b).unwrap();
assert_eq!(message_b, b"The package from Sarah arrives tomorrow morning.");