I want to get the SHA256 hash of some bytes in a Solana on-chain program. What's the best practice? Should I use a normal Rust crate like sha256
crate? Or is there any approach that is dedicatedly designed for Solana on-chain program?
1 Answer
I've got the answer in Anchor Discord server. The answer is solana_program::hashv::hashv
.