encodeSha1 static method

String encodeSha1(
  1. String data
)

sha1 散列计算

Implementation

static String encodeSha1(String data) {
  var content = const Utf8Encoder().convert(data);
  var digest = sha1.convert(content);
  return hex.encode(digest.bytes);
}