DartCryptography class

An implementation of Cryptography in pure Dart.

Algorithms

The following algorithms are supported:

SHA-1/SHA-2 implementations use package:crypto, a package maintained by Google.

Inheritance
Implementers

Constructors

DartCryptography({Random? random})
Constructs instance of DartCryptography.

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, PaddingAlgorithm paddingAlgorithm = PaddingAlgorithm.pkcs7, int secretKeyLength = 32}) AesCbc
A factory used by AesCbc.
override
aesCtr({required MacAlgorithm macAlgorithm, int secretKeyLength = 32, int counterBits = AesCtr.defaultCounterBits}) AesCtr
A factory used by AesCtr.
override
aesGcm({int secretKeyLength = 32, int nonceLength = 12}) AesGcm
A factory used by AesGcm.
override
argon2id({required int parallelism, required int memorySize, required int iterations, required int hashLength}) Argon2id
A factory used by Argon2id.
override
blake2b({int hashLengthInBytes = 64}) Blake2b
A factory used by Blake2b.
override
blake2s({int hashLengthInBytes = 32}) Blake2s
A factory used by Blake2s.
override
chacha20({required MacAlgorithm macAlgorithm}) Chacha20
A factory used by Chacha20.
override
chacha20Poly1305Aead() Chacha20
A factory used by Chacha20.poly1305Aead.
override
ecdhP256({required int length}) Ecdh
A factory used by Ecdh.p256.
override
ecdhP384({required int length}) Ecdh
A factory used by Ecdh.p384.
override
ecdhP521({required int length}) Ecdh
A factory used by Ecdh.p521.
override
ecdsaP256(HashAlgorithm hashAlgorithm) Ecdsa
A factory used by Ecdsa.p256.
override
ecdsaP384(HashAlgorithm hashAlgorithm) Ecdsa
A factory used by Ecdsa.p384.
override
ecdsaP521(HashAlgorithm hashAlgorithm) Ecdsa
A factory used by Ecdsa.p521.
override
ed25519() Ed25519
A factory used by Ed25519.
override
hchacha20() Hchacha20
A factory used by Hchacha20.
override
hkdf({required Hmac hmac, required int outputLength}) Hkdf
A factory used by Hkdf.
override
hmac(HashAlgorithm hashAlgorithm) Hmac
A factory used by Hmac.
override
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
A factory used by Pbkdf2.
override
poly1305() Poly1305
A factory used by Poly1305.
override
rsaPss(HashAlgorithm hashAlgorithm, {required int nonceLengthInBytes}) RsaPss
A factory used by RsaPss.
override
rsaSsaPkcs1v15(HashAlgorithm hashAlgorithm) RsaSsaPkcs1v15
A factory used by RsaSsaPkcs1v15.
override
sha1() Sha1
A factory used by Sha1.
override
sha224() Sha224
A factory used by Sha224.
override
sha256() Sha256
A factory used by Sha256.
override
sha384() Sha384
A factory used by Sha384.
override
sha512() Sha512
A factory used by Sha512.
override
toString() String
A string representation of this object.
inherited
withRandom(Random? random) DartCryptography
override
x25519() X25519
A factory used by X25519.
override
xchacha20({required MacAlgorithm macAlgorithm}) Xchacha20
A factory used by Xchacha20.
override
xchacha20Poly1305Aead() Xchacha20
A factory used by Xchacha20.poly1305Aead.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

defaultInstance DartCryptography
final