CryptoType class Null safety

A type of encryption based on Web Crypto. see: https://pub.dev/packages/webcrypto

Annotations
  • @freezed

Constructors

CryptoType.aesCbc({required AesCbcSecretKey key, required Uint8List iv})
see AesCbcSecretKey
const
factory
CryptoType.aesCtr({required AesCtrSecretKey key, required List<int> counter, required int length})
see AesCtrSecretKey
const
factory
CryptoType.aesGcm({required AesGcmSecretKey key, required Uint8List iv, List<int>? authTag, List<int>? additionalData, int? tagLength})
see AesGcmSecretKey
const
factory
CryptoType.plain()
non-encrypted file
const
factory
CryptoType.rsaOaep({required RsaOaepPrivateKey key, List<int>? label})
see RsaOaepPrivateKey
const
factory

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

map<TResult extends Object?>({required TResult plain(TypePlain value), required TResult aesCbc(TypeAesCbc value), required TResult aesCtr(TypeAesCtr value), required TResult aesGcm(TypeAesGcm value), required TResult rsaOaep(TypeRsaOaep value)}) → TResult
mapOrNull<TResult extends Object?>({TResult plain(TypePlain value)?, TResult aesCbc(TypeAesCbc value)?, TResult aesCtr(TypeAesCtr value)?, TResult aesGcm(TypeAesGcm value)?, TResult rsaOaep(TypeRsaOaep value)?}) → TResult?
maybeMap<TResult extends Object?>({TResult plain(TypePlain value)?, TResult aesCbc(TypeAesCbc value)?, TResult aesCtr(TypeAesCtr value)?, TResult aesGcm(TypeAesGcm value)?, TResult rsaOaep(TypeRsaOaep value)?, required TResult orElse()}) → TResult
maybeWhen<TResult extends Object?>({TResult plain()?, TResult aesCbc(AesCbcSecretKey key, Uint8List iv)?, TResult aesCtr(AesCtrSecretKey key, List<int> counter, int length)?, TResult aesGcm(AesGcmSecretKey key, Uint8List iv, List<int>? authTag, List<int>? additionalData, int? tagLength)?, TResult rsaOaep(RsaOaepPrivateKey key, List<int>? label)?, required TResult orElse()}) → TResult
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult plain(), required TResult aesCbc(AesCbcSecretKey key, Uint8List iv), required TResult aesCtr(AesCtrSecretKey key, List<int> counter, int length), required TResult aesGcm(AesGcmSecretKey key, Uint8List iv, List<int>? authTag, List<int>? additionalData, int? tagLength), required TResult rsaOaep(RsaOaepPrivateKey key, List<int>? label)}) → TResult
whenOrNull<TResult extends Object?>({TResult plain()?, TResult aesCbc(AesCbcSecretKey key, Uint8List iv)?, TResult aesCtr(AesCtrSecretKey key, List<int> counter, int length)?, TResult aesGcm(AesGcmSecretKey key, Uint8List iv, List<int>? authTag, List<int>? additionalData, int? tagLength)?, TResult rsaOaep(RsaOaepPrivateKey key, List<int>? label)?}) → TResult?

Operators

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