0

I want to convert the [u8; 2] back to u16.

I found this isn't simply a u16::from_be_bytes or u16::from_le_bytes.

1 Answer 1

0

https://github.com/paritytech/substrate/blob/c4d36065764ee23aeb3ccd181c4b6ecea8d2447a/primitives/core/src/crypto.rs#L315-L336

It's impossible.

The information was lost in this algorithm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.