isValidSha256Format method

bool isValidSha256Format(
  1. String value
)

Checks whether given String is valid SHA-256 format.

Returns true if given String is valid SHA-256 format, otherwise false.

Implementation

bool isValidSha256Format(String value) {
  final validator = RegExp('[A-Fa-f0-9]{64}');
  return validator.hasMatch(value);
}