use digest::{BlockInput, FixedOutput}; use digest::generic_array::typenum::Unsigned; use ring_digest::*; #[test] fn test_block_len() { assert_eq!( ring::digest::SHA1_FOR_LEGACY_USE_ONLY.block_len, ::BlockSize::to_usize() ); assert_eq!( ring::digest::SHA256.block_len, ::BlockSize::to_usize() ); assert_eq!( ring::digest::SHA384.block_len, ::BlockSize::to_usize() ); assert_eq!( ring::digest::SHA512.block_len, ::BlockSize::to_usize() ); assert_eq!( ring::digest::SHA512_256.block_len, ::BlockSize::to_usize() ); } #[test] fn test_output_len() { assert_eq!( ring::digest::SHA1_FOR_LEGACY_USE_ONLY.output_len, ::OutputSize::to_usize() ); assert_eq!( ring::digest::SHA256.output_len, ::OutputSize::to_usize() ); assert_eq!( ring::digest::SHA384.output_len, ::OutputSize::to_usize() ); assert_eq!( ring::digest::SHA512.output_len, ::OutputSize::to_usize() ); assert_eq!( ring::digest::SHA512_256.output_len, ::OutputSize::to_usize() ); }