569dda01fd
NOTE: useful for changePassword, which requires the hash password functionality as well.
8 lines
199 B
Dart
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;
|
|
}
|