Hashing Value (String or Int OR etc...) in Flutter ## Heading ##
I have Value like "Almahery"
How to Hash in in SHA 256 ?
Import (Crypto) :
import 'package:crypto/crypto.dart';
Then add this code:
var bytes1 = utf8.encode("Almahery"); // data being hashed
var digest1 = sha256.convert(bytes1); // Hashing Process
print("Digest as bytes: ${digest1.bytes}"); // Print Bytes
print("Digest as hex string: $digest1"); // Print After Hashing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With