Keccak256
  • 30 Jan 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Keccak256

  • Dark
    Light
  • PDF

Article summary

Keccak256 digest is being calculated over given vector of bytes.

See the example below:

use scrypto::prelude::*;

#[blueprint]
mod crypto_example {
    struct CryptoScrypto {}

    impl CryptoScrypto {
        pub fn keccak256_hash(data: Vec<u8>) -> Hash {
            let hash = CryptoUtils::keccak256_hash(data);
            hash
        }
    }
}


Was this article helpful?

What's Next