AesCrypt class
Wraps encryption and decryption methods and algorithms.
Constructors
- AesCrypt.new([String password = ''])
- Creates the library wrapper.
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
-
aesDecrypt(
Uint8List data) → Uint8List -
aesEncrypt(
Uint8List data) → Uint8List -
Encrypts binary data
data
with AES algorithm. -
aesSetKeys(
Uint8List key, [Uint8List? iv]) → void -
Sets AES encryption key
key
and the initialization vectoriv
. -
aesSetMode(
AesMode mode) → void -
Sets AES mode of operation as
mode
. -
aesSetParams(
Uint8List key, Uint8List iv, AesMode mode) → void -
Sets AES encryption key
key
, the initialization vectoriv
and AES modemode
. -
createIV(
) → Uint8List - Creates random initialization vector.
-
createKey(
[int length = 32]) → Uint8List -
Creates random encryption key of
length
bytes long. -
decryptDataFromFile(
String srcFilePath) → Future< Uint8List> -
Decrypts binary data from
srcFilePath
file asynchronously. -
decryptDataFromFileSync(
String srcFilePath) → Uint8List -
Decrypts binary data from
srcFilePath
file synchronously. -
decryptFile(
String srcFilePath, [String destFilePath = '']) → Future< String> -
Decrypts
srcFilePath
file todestFilePath
file asynchronously. -
decryptFileSync(
String srcFilePath, [String destFilePath = '']) → String -
Decrypts
srcFilePath
file todestFilePath
file synchronously. -
decryptTextFromFile(
String srcFilePath, {bool utf16 = false, Endian endian = Endian.big}) → Future< String> -
Decrypts a plain text from
srcFilePath
file asynchronously. -
decryptTextFromFileSync(
String srcFilePath, {bool utf16 = false, Endian endian = Endian.big}) → String -
Decrypts a plain text from
srcFilePath
file synchronously. -
encryptDataToFile(
Uint8List srcData, String destFilePath) → Future< String> -
Encrypts binary data
srcData
todestFilePath
file asynchronously. -
encryptDataToFileSync(
Uint8List srcData, String destFilePath) → String -
Encrypts binary data
srcData
todestFilePath
file synchronously. -
encryptFile(
String srcFilePath, [String destFilePath = '']) → Future< String> -
Encrypts
srcFilePath
file todestFilePath
file asynchronously. -
encryptFileSync(
String srcFilePath, [String destFilePath = '']) → String -
Encrypts
srcFilePath
file todestFilePath
file synchronously. -
encryptTextToFile(
String srcString, String destFilePath, {bool utf16 = false, Endian endian = Endian.big, bool bom = false}) → Future< String> -
Encrypts a plain text string
srcString
todestFilePath
file asynchronously. -
encryptTextToFileSync(
String srcString, String destFilePath, {bool utf16 = false, Endian endian = Endian.big, bool bom = false}) → String -
Encrypts a plain text string
srcString
todestFilePath
file synchronously. -
hmacSha256(
Uint8List key, Uint8List data) → Uint8List -
Computes HMAC-SHA256 code for binary data
data
using cryptographic keykey
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setOverwriteMode(
AesCryptOwMode mode) → void -
Sets overwrite mode
mode
for write file operations during encryption or decryption process. -
setPassword(
String password) → void - Sets encryption/decryption password.
-
setUserData(
{String createdBy = 'Dart aes_crypt library', String createdOn = '', String createdAt = ''}) → void - Sets standard extension tags used in the AES Crypt file format.
-
sha256(
Uint8List data) → Uint8List -
Computes SHA256 hash for binary data
data
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited