actions-test/lib/backend/crypto.dart
Jakob Meier 569dda01fd
Moved hash function into seperate file.
NOTE: useful for changePassword,
which requires the hash password functionality as well.
2023-03-25 14:27:47 +01:00

8 lines
199 B
Dart

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;
}