hash static method
Computes a SHA-256 hash of the given string content.
Implementation
static String hash(String content) {
if (content.isEmpty) {
final bytes = utf8.encode('');
return sha256.convert(bytes).toString();
}
final bytes = utf8.encode(content);
return sha256.convert(bytes).toString();
}