cipherlib library
Implementations of cryptographic algorithms for encryption and decryption in pure Dart.
Classes

AEADCipher<
C extends Cipher, M extends MACHashBase> 
Provides support for AEAD (Authenticated Encryption with Associated Data) to
the any Cipher with any
MACHashBase
algorithm.  AEADCipherSink
 Extends the base AEADCipherSink to generate message digest for cipher algorithms.
 AEADResult
 The result fromo AEAD ciphers
 AES
 AES (Advanced Encryption Standard) is a symmetric encryption algorithm used for securing data. It operates on fixedsize blocks of data (128 bits) using keys of 128, 192, or 256 bits.
 AESInCBCMode
 Provides encryption and decryption for AES cipher in CBC mode.
 AESInCBCModeDecrypt
 Provides decryption for AES cipher in CBC mode.
 AESInCBCModeDecryptSink
 The sink used for decryption by the AESInCBCModeDecrypt algorithm.
 AESInCBCModeEncrypt
 Provides encryption for AES cipher in CBC mode.
 AESInCBCModeEncryptSink
 The sink used for encryption by the AESInCBCModeEncrypt algorithm.
 AESInCFBMode
 Provides encryption and decryption for AES cipher in CFB mode.
 AESInCFBModeDecrypt
 Provides decryption for AES cipher in CFB mode.
 AESInCFBModeDecryptSink
 The sink used for decryption by the AESInCFBModeDecrypt algorithm.
 AESInCFBModeEncrypt
 Provides encryption for AES cipher in CFB mode.
 AESInCFBModeEncryptSink
 The sink used for encryption by the AESInCFBModeEncrypt algorithm.
 AESInCTRMode
 Provides encryption and decryption for AES cipher in CTR mode.
 AESInCTRModeCipher
 Provides AES cipher in CTR mode.
 AESInCTRModeSink
 The sink used for both encryption and decryption by the AESInCTRModeCipher algorithm.
 AESInECBMode
 Provides encryption and decryption for AES cipher in ECB mode.
 AESInECBModeDecrypt
 Provides decryption for AES cipher in ECB mode.
 AESInECBModeDecryptSink
 The sink used for decryption by the AESInECBModeDecrypt algorithm.
 AESInECBModeEncrypt
 Provides encryption for AES cipher in ECB mode.
 AESInECBModeEncryptSink
 The sink used for encryption by the AESInECBModeEncrypt algorithm.
 AESInGCMMode
 Provides encryption and decryption for AES cipher in GCM mode.
 AESInGCMModeDecrypt
 Provides AES cipher in GCM mode for decryption.
 AESInGCMModeDecryptSink
 The sink used for both encryption and decryption by the AESInGCMModeDecrypt algorithm.
 AESInGCMModeEncrypt
 Provides AES cipher in GCM mode for encryption.
 AESInGCMModeEncryptSink
 The sink used for both encryption and decryption by the AESInGCMModeEncrypt algorithm.
 AESInIGEMode
 Provides encryption and decryption for AES cipher in IGE mode.
 AESInIGEModeDecrypt
 Provides decryption for AES cipher in IGE mode.
 AESInIGEModeDecryptSink
 The sink used for decryption by the AESInIGEModeDecrypt algorithm.
 AESInIGEModeEncrypt
 Provides encryption for AES cipher in IGE mode.
 AESInIGEModeEncryptSink
 The sink used for encryption by the AESInIGEModeEncrypt algorithm.
 AESInOFBMode
 Provides encryption and decryption for AES cipher in OFB mode.
 AESInOFBModeCipher
 Provides encryption for AES cipher in OFB mode.
 AESInOFBModeSink
 The sink used for encryption by the AESInOFBModeCipher algorithm.
 AESInPCBCMode
 Provides encryption and decryption for AES cipher in PCBC mode.
 AESInPCBCModeDecrypt
 Provides decryption for AES cipher in PCBC mode.
 AESInPCBCModeDecryptSink
 The sink used for decryption by the AESInPCBCModeDecrypt algorithm.
 AESInPCBCModeEncrypt
 Provides encryption for AES cipher in PCBC mode.
 AESInPCBCModeEncryptSink
 The sink used for encryption by the AESInPCBCModeEncrypt algorithm.
 AESInXTSMode
 Provides encryption and decryption for AES cipher in XTS mode.
 AESInXTSModeDecrypt
 Provides decryption for AES cipher in XTS mode.
 AESInXTSModeDecryptSink
 This implementation is derived from 16192018  IEEE Standard for Cryptographic Protection of Data on BlockOriented Storage Devices.
 AESInXTSModeEncrypt
 Provides encryption for AES cipher in XTS mode.
 AESInXTSModeEncryptSink
 This implementation is derived from 16192018  IEEE Standard for Cryptographic Protection of Data on BlockOriented Storage Devices.
 ChaCha20
 ChaCha20 is a stream cipher designed to provide 256bit security. It uses a 256bit key and a 64bit nonce to generate a unique keystream for each messages.
 ChaCha20Poly1305

ChaCha20Poly1305 is a cryptographic algorithm combining ChaCha20
stream cipher for encryption and
Poly1305
for generating message authentication code. It provides both confidentiality and integrity protection, making it a popular choice for secure communication protocols like TLS.  ChaCha20Sink
 This sink is used by the ChaCha20 algorithm.
 Cipher
 Template for Cipher algorithm that uses the same logic for both encryption and decryption.
 CipherBase
 CipherSink
 Template for Cipher algorithm sink.

CollateCipher<
E extends Cipher, D extends Cipher>  Template for Cipher algorithm which does not use the same logic for encryption and decryption.
 Nonce
 Random initialization vector builder.
 Nonce64
 The 64bit initialization vector builder.
 Padding
 Padding is a process to extend the input message to match a specific block size to be used in the cryptographic algorithms.
 Salsa20
 Salsa20 is a stream cipher designed to provide 256bit security. It uses a 256bit key and a 64bit nonce to generate a unique keystream for each messages.
 Salsa20Poly1305

Salsa20Poly1305 is a cryptographic algorithm combining the Salsa20
stream cipher for encryption and the
Poly1305
for generating message authentication code.  Salsa20Sink
 This sink is used by the Salsa20 algorithm.
 SaltedCipher
 Template for Ciphers accepting a random initialization vector or salt

SaltedCollateCipher<
E extends SaltedCipher, D extends SaltedCipher>  Template for Cipher algorithm accepting an IV (Initialization Vector) which does not use the same logic for encryption and decryption.
 StreamCipherBase
 Template for Cipher algorithm that uses the same logic for both encryption and decryption.
 XOR
 XOR (exclusive or) cipher is a simple and lightweight method of encrypting data. It is often used for basic data obfuscation.
Extensions
 ChaCha20ExtentionForPoly1305 on ChaCha20
 Adds poly1305 to ChaCha20 to create an instance of ChaCha20Poly1305
 Salsa20ExtentionForPoly1305 on Salsa20
 Adds poly1305 to Salsa20 to create an instance of Salsa20Poly1305
Functions

chacha20(
List< int> message, List<int> key, {List<int> ? nonce, int counter = 1}) → Uint8List  Apply ChaCha20 cipher with the follwing parameters:

chacha20poly1305(
List< int> message, List<int> key, {List<int> ? mac, List<int> ? nonce, List<int> ? aad}) → AEADResult 
Transforms
message
with ChaCha20 algorithm and generates the message digest with Poly1305 authentication code generator. 
chacha20Stream(
Stream< int> stream, List<int> key, {List<int> ? nonce, int counter = 1}) → Stream<int>  Apply ChaCha20 cipher with the follwing parameters:

salsa20(
List< int> message, List<int> key, {List<int> ? nonce, int counter = 0}) → Uint8List  Apply Salsa20 cipher with the follwing parameters:

salsa20poly1305(
List< int> message, List<int> key, {List<int> ? mac, List<int> ? nonce, List<int> ? aad}) → AEADResult 
Transforms
message
with Salsa20 algorithm and generates the message digest with Poly1305 authentication code generator. 
salsa20Stream(
Stream< int> stream, List<int> key, {List<int> ? nonce, int counter = 0}) → Stream<int>  Apply Salsa20 cipher with the follwing parameters:

xor(
List< int> message, List<int> key) → Uint8List 
Apply XOR cipher to the
message
using thekey
. 
xorStream(
Stream< int> stream, List<int> key) → Stream<int> 
Apply XOR cipher to the message
stream
using thekey
.