FlutterCryptography class
An implementation Cryptography
that uses native operating system APIs.
Getting started
import 'package:better_cryptography_flutter/cryptography_flutter.dart' show FlutterCryptography;
void main() {
// Enables use of Flutter cryptography.
//
// You can call this anywhere in your application, but we recommend the
// main function.
FlutterCryptography.enable();
// ...
}
Supported algorithms
- Android:
AesCbc
AesCtr
AesGcm
Chacha20.poly1305Aead
- iOS and Mac OS X:
AesGcm
Chacha20.poly1305Aead
Constructors
- FlutterCryptography()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
aesCbc(
{required MacAlgorithm macAlgorithm, int secretKeyLength = 32}) → AesCbc -
inherited
-
aesCtr(
{required MacAlgorithm macAlgorithm, int secretKeyLength = 32, int counterBits = 64}) → AesCtr -
inherited
-
aesGcm(
{int secretKeyLength = 32, int nonceLength = 12}) → AesGcm -
inherited
-
argon2id(
{required int parallelism, required int memorySize, required int iterations, required int hashLength}) → Argon2id -
inherited
-
blake2b(
) → Blake2b -
inherited
-
blake2s(
) → Blake2s -
inherited
-
chacha20(
{required MacAlgorithm macAlgorithm}) → Chacha20 -
inherited
-
chacha20Poly1305Aead(
) → Chacha20 -
inherited
-
ecdhP256(
{required int length}) → Ecdh -
inherited
-
ecdhP384(
{required int length}) → Ecdh -
inherited
-
ecdhP521(
{required int length}) → Ecdh -
inherited
-
ecdsaP256(
HashAlgorithm hashAlgorithm) → Ecdsa -
inherited
-
ecdsaP384(
HashAlgorithm hashAlgorithm) → Ecdsa -
inherited
-
ecdsaP521(
HashAlgorithm hashAlgorithm) → Ecdsa -
inherited
-
ed25519(
) → Ed25519 -
inherited
-
hchacha20(
) → Hchacha20 -
inherited
-
hkdf(
{required Hmac hmac, required int outputLength}) → Hkdf -
inherited
-
hmac(
HashAlgorithm hashAlgorithm) → Hmac -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pbkdf2(
{required MacAlgorithm macAlgorithm, required int iterations, required int bits}) → Pbkdf2 -
inherited
-
poly1305(
) → Poly1305 -
inherited
-
rsaPss(
HashAlgorithm hashAlgorithm, {required int nonceLengthInBytes}) → RsaPss -
inherited
-
rsaSsaPkcs1v15(
HashAlgorithm hashAlgorithm) → RsaSsaPkcs1v15 -
inherited
-
sha1(
) → Sha1 -
inherited
-
sha224(
) → Sha224 -
inherited
-
sha256(
) → Sha256 -
inherited
-
sha384(
) → Sha384 -
inherited
-
sha512(
) → Sha512 -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
x25519(
) → X25519 -
inherited
-
xchacha20(
{required MacAlgorithm macAlgorithm}) → Xchacha20 -
inherited
-
xchacha20Poly1305Aead(
) → Xchacha20 -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- defaultInstance → FlutterCryptography
-
Default instance of FlutterCryptography.
final
Static Methods
-
enable(
) → void - Enables use of FlutterCryptography.