sha256Hex function

Future<String> sha256Hex(
  1. String value
)

Computes the lowercase hex SHA-256 digest of value.

Implementation

Future<String> sha256Hex(String value) async {
  final hash = sha256.convert(utf8.encode(value));
  return hash.bytes.map((b) => b.toRadixString(16).padLeft(2, '0')).join('');
}