Fingerprint_Card
Loading...
Searching...
No Matches
ICSharpCode.SharpZipLib.Encryption.ZipAESTransform Class Reference

Transforms stream using AES in CTR mode. More...

Inheritance diagram for ICSharpCode.SharpZipLib.Encryption.ZipAESTransform:
Collaboration diagram for ICSharpCode.SharpZipLib.Encryption.ZipAESTransform:

Public Member Functions

 ZipAESTransform (string key, byte[] saltBytes, int blockSize, bool writeMode)
 Constructor.
int TransformBlock (byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
 Implement the ICryptoTransform method.
byte[] GetAuthCode ()
 Returns the 10 byte AUTH CODE to be checked or appended immediately following the AES data stream.
byte[] TransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount)
 Not implemented.
void Dispose ()
 Cleanup internal state.

Properties

byte[] PwdVerifier [get]
 Returns the 2 byte password verifier.
int InputBlockSize [get]
 Gets the size of the input data blocks in bytes.
int OutputBlockSize [get]
 Gets the size of the output data blocks in bytes.
bool CanTransformMultipleBlocks [get]
 Gets a value indicating whether multiple blocks can be transformed.
bool CanReuseTransform [get]
 Gets a value indicating whether the current transform can be reused.

Private Attributes

int _blockSize
ICryptoTransform _encryptor
readonly byte[] _counterNonce
byte[] _encryptBuffer
int _encrPos
byte[] _pwdVerifier
HMACSHA1 _hmacsha1
bool _finalised
bool _writeMode

Static Private Attributes

const int PWD_VER_LENGTH = 2
const int KEY_ROUNDS = 1000
const int ENCRYPT_BLOCK = 16

Detailed Description

Transforms stream using AES in CTR mode.

Constructor & Destructor Documentation

◆ ZipAESTransform()

ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.ZipAESTransform ( string key,
byte[] saltBytes,
int blockSize,
bool writeMode )

Constructor.

Parameters
keyPassword string
saltBytesRandom bytes, length depends on encryption strength. 128 bits = 8 bytes, 192 bits = 12 bytes, 256 bits = 16 bytes.
blockSizeThe encryption strength, in bytes eg 16 for 128 bits.
writeModeTrue when creating a zip, false when reading. For the AuthCode.

Member Function Documentation

◆ Dispose()

void ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.Dispose ( )

Cleanup internal state.

◆ GetAuthCode()

byte[] ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.GetAuthCode ( )

Returns the 10 byte AUTH CODE to be checked or appended immediately following the AES data stream.

◆ TransformBlock()

int ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.TransformBlock ( byte[] inputBuffer,
int inputOffset,
int inputCount,
byte[] outputBuffer,
int outputOffset )

Implement the ICryptoTransform method.

◆ TransformFinalBlock()

byte[] ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.TransformFinalBlock ( byte[] inputBuffer,
int inputOffset,
int inputCount )

Not implemented.

Member Data Documentation

◆ _blockSize

int ICSharpCode.SharpZipLib.Encryption.ZipAESTransform._blockSize
private

◆ _counterNonce

readonly byte [] ICSharpCode.SharpZipLib.Encryption.ZipAESTransform._counterNonce
private

◆ _encrPos

int ICSharpCode.SharpZipLib.Encryption.ZipAESTransform._encrPos
private

◆ _encryptBuffer

byte [] ICSharpCode.SharpZipLib.Encryption.ZipAESTransform._encryptBuffer
private

◆ _encryptor

ICryptoTransform ICSharpCode.SharpZipLib.Encryption.ZipAESTransform._encryptor
private

◆ _finalised

bool ICSharpCode.SharpZipLib.Encryption.ZipAESTransform._finalised
private

◆ _hmacsha1

HMACSHA1 ICSharpCode.SharpZipLib.Encryption.ZipAESTransform._hmacsha1
private

◆ _pwdVerifier

byte [] ICSharpCode.SharpZipLib.Encryption.ZipAESTransform._pwdVerifier
private

◆ _writeMode

bool ICSharpCode.SharpZipLib.Encryption.ZipAESTransform._writeMode
private

◆ ENCRYPT_BLOCK

const int ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.ENCRYPT_BLOCK = 16
staticprivate

◆ KEY_ROUNDS

const int ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.KEY_ROUNDS = 1000
staticprivate

◆ PWD_VER_LENGTH

const int ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.PWD_VER_LENGTH = 2
staticprivate

Property Documentation

◆ CanReuseTransform

bool ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.CanReuseTransform
get

Gets a value indicating whether the current transform can be reused.

◆ CanTransformMultipleBlocks

bool ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.CanTransformMultipleBlocks
get

Gets a value indicating whether multiple blocks can be transformed.

◆ InputBlockSize

int ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.InputBlockSize
get

Gets the size of the input data blocks in bytes.

◆ OutputBlockSize

int ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.OutputBlockSize
get

Gets the size of the output data blocks in bytes.

◆ PwdVerifier

byte [] ICSharpCode.SharpZipLib.Encryption.ZipAESTransform.PwdVerifier
get

Returns the 2 byte password verifier.


The documentation for this class was generated from the following file: