ECCiphertext class
Provides an authenticated ciphertext with asymmetric ECC encryption/decryption.
This uses ECDH to determine a shared symmetric key between the sender and recipient. The plaintext is encrypted using authenticated AES-GCM. PKCS7 padding is used.
Constructors
- ECCiphertext.encrypt({required Uint8List plaintext, required ECPublicKey recipientKey, required ECPrivateKey senderKey})
-
Encrypts
plaintext
using the privatesenderKey
and publicrecipientKey
. - ECCiphertext.fromBytes(Uint8List bytes)
- ECCiphertext.fromReader(BytesReader reader)
Properties
Methods
-
decrypt(
{required ECPrivateKey recipientKey, required ECPublicKey senderKey}) → Uint8List? -
Obtains the plaintext by decrypting with the private
recipientKey
and publicsenderKey
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBytes(
) → Uint8List -
Obtains a cached Uint8List with data serialized for this object
inherited
-
toHex(
) → String -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
Writer writer) → void -
Override to write data into
writer
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited