flutter_sodium 0.2.0 flutter_sodium: ^0.2.0 copied to clipboard
Flutter bindings for libsodium, a modern, easy-to-use crypto library.
import 'package:flutter_sodium/flutter_sodium.dart';
// initialize sodium (one-time)
Sodium.init();
// Password hashing (using Argon)
final password = 'my password';
final str = PasswordHash.hashStringStorage(password);
print(str);
// verify hash str
final valid = PasswordHash.verifyStorage(str, password);
assert(valid);