1

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 1

2

I've got the answer in Anchor Discord server. The answer is solana_program::hashv::hashv.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.