diff --git a/uint/src/uint.rs b/uint/src/uint.rs index a25c934..b684493 100644 --- a/uint/src/uint.rs +++ b/uint/src/uint.rs @@ -1369,4 +1369,12 @@ macro_rules! impl_quickcheck_arbitrary_for_uint { } construct_uint!(U256, 4); -construct_uint!(U512, 8); \ No newline at end of file +construct_uint!(U512, 8); + +impl From for [u8; 32] { + fn from(number: U256) -> Self { + let mut arr = [0u8; 32]; + number.to_big_endian(&mut arr); + arr + } +} \ No newline at end of file