rust_crypto 0.0.1
rust_crypto: ^0.0.1 copied to clipboard
Hashes, Hmacs, Argon2 Passwords and AES-GCM-SIV encryption. Digests for sha1, sha2, md5, blake3, crc32
example/rust_crypto_example.dart
import 'dart:convert' show Utf8Encoder;
import 'package:rust_crypto/rust_crypto.dart';
Future<void> main() async {
final rustCrypto = await rustCryptoInstance(
wasiConfig: WasiConfig(preopenedDirs: [], webBrowserFileSystem: {}),
);
final bytes = const Utf8Encoder().convert('hello world');
print('"hello world" sha256: ${rustCrypto.sha2.sha256(bytes: bytes)}');
print('"hello world" sha512: ${rustCrypto.sha2.sha512(bytes: bytes)}');
}
copied to clipboard