HiveAesCipher class

Default encryption algorithm. Uses AES256 CBC with PKCS7 padding.

Implemented types
Implementers

Constructors

HiveAesCipher(List<int> key)
Create a cipher with the given key.

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

calculateKeyCrc() int
Calculate a hash of the key. Make sure to use a secure hash.
override
decrypt(Uint8List inp, int inpOff, int inpLength, Uint8List out, int outOff) FutureOr<int>
Decrypt the given bytes.
override
encrypt(Uint8List inp, int inpOff, int inpLength, Uint8List out, int outOff) FutureOr<int>
  • inp: the total bytes in plain text
  • inpOff: the byte offset to start encryption at
  • inpLength: the number of bytes (length) to encrypt
  • out: the buffer to write the encrypted output in
  • outOff: the byte offset to write the encrypted output to
  • override
    generateIv() Uint8List
    Generates a random initialization vector (internal)
    maxEncryptedSize(Uint8List inp) int
    The maximum size the input can have after it has been encrypted.
    override
    noSuchMethod(Invocation invocation) → dynamic
    Invoked when a nonexistent method or property is accessed.
    inherited
    toString() String
    A string representation of this object.
    inherited

    Operators

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