encodeSha256 static method

String encodeSha256(
  1. String data
)

sha256 加密

Implementation

static String encodeSha256(String data) {
  var bytes = utf8.encode(data);
  var encodeStr = sha256.convert(bytes);
  return encodeStr.toString();
}