actions-test/lib/backend/crypto.dart

9 lines
199 B
Dart
Raw Normal View History

import 'dart:convert';
import 'package:crypto/crypto.dart';
String hashPassword(String pw) {
var bytes = utf8.encode(pw);
final password = sha256.convert(bytes).toString();
return password;
}