File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1616// limitations under the License.
1717
1818//! Hashing functions.
19+ //!
20+ //! This module is gated by `full-crypto` feature. If you intend to use any of the functions
21+ //! defined here within your runtime, you should most likely rather use [sp_io::hashing] instead,
22+ //! unless you know what you're doing. Using `sp_io` will be more performant, since instead of
23+ //! computing the hash in WASM it delegates that computation to the host client.
1924
2025use blake2_rfc;
2126use sha2:: { Digest , Sha256 } ;
Original file line number Diff line number Diff line change @@ -735,6 +735,11 @@ pub trait Hashing {
735735 sp_core:: hashing:: keccak_256 ( data)
736736 }
737737
738+ /// Conduct a 512-bit Keccak hash.
739+ fn keccak_512 ( data : & [ u8 ] ) -> [ u8 ; 64 ] {
740+ sp_core:: hashing:: keccak_512 ( data)
741+ }
742+
738743 /// Conduct a 256-bit Sha2 hash.
739744 fn sha2_256 ( data : & [ u8 ] ) -> [ u8 ; 32 ] {
740745 sp_core:: hashing:: sha2_256 ( data)
You can’t perform that action at this time.
0 commit comments