sha256 static method
Returns SHA-256 hash of the message.
Implementation
static Uint8List sha256(dynamic message) {
if (message is String) {
message = Uint8List.fromList(utf8.encode(message));
} else if (message is! Uint8List) {
throw Exception('The message must be either of string or Uint8List');
}
var out = Uint8List(32);
TweetNaClExt.crypto_hash_sha256(out, message as Uint8List);
return out;
}