sha256ofString method

String sha256ofString(
  1. String input
)

Returns the sha256 hash of input in hex notation.

Implementation

String sha256ofString(String input) {
  final bytes = utf8.encode(input);
  final digest = sha256.convert(bytes);
  return digest.toString();
}