C# 클래스 DotNetCrypt.ManagedTransformBase

An abstract base class for managed implementations of ICryptoTransform.

This class deals with the various forms of padding available. Unlike the classes built into the .NET framework, however, for modes which effectively operate in stream cipher mode (CFB, OFB), it is permissible to encrypt a message which is not an exact number of bytes without specifying a padding mode other than System.Security.Cryptography.PaddingMode.None

It also takes into account the cipher mode to be used. For increased compatibility with other systems, counter mode (CTR) is also supported via the ExtendedCipherMode enumeration.

상속: ICryptoTransform
파일 보기 프로젝트 열기: drizzt/KeePass-SerpentCipher

Private Properties

프로퍼티 타입 설명
Decrypt void
DecryptData int
Encrypt void
EncryptData int
IncrementCounter void

공개 메소드들

메소드 설명
Clear ( ) : void

Releases all resources used by the ManagedTransformBase class.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

TransformBlock ( byte inputBuffer, int inputOffset, int inputCount, byte outputBuffer, int outputOffset ) : int

Transforms the specified region of the input byte array and copies the resulting transform to the specified region of the output byte array.

TransformFinalBlock ( byte inputBuffer, int inputOffset, int inputCount ) : byte[]

Transforms the specified region of the specified byte array.

보호된 메소드들

메소드 설명
DecryptBlock ( byte block ) : void

Decrypts a single block of bytes, writing the result into the provided array.

Dispose ( bool disposing ) : void

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed.

If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

EncryptBlock ( byte block ) : void

Encrypts a single block of bytes, writing the result into the provided array.

ManagedTransformBase ( ISymmetricAlgorithm algorithm, byte rgbIv, TransformDirection transformDirection, Endianness endianness ) : System

Creates a new managed transform instance, reading necessary setting values from the provided ISymmetricAlgorithm instance.

Reset ( ) : void

Clears all potentially sensitive data stores.

비공개 메소드들

메소드 설명
Decrypt ( uint cipher ) : void
DecryptData ( byte inputBuffer, int inputOffset, int inputCount, byte &outputBuffer, int outputOffset, PaddingMode paddingMode, bool final ) : int
Encrypt ( uint plain ) : void
EncryptData ( byte inputBuffer, int inputOffset, int inputCount, byte &outputBuffer, int outputOffset, PaddingMode paddingMode, bool final ) : int
IncrementCounter ( ) : void

메소드 상세

Clear() 공개 메소드

Releases all resources used by the ManagedTransformBase class.
public Clear ( ) : void
리턴 void

DecryptBlock() 보호된 메소드

Decrypts a single block of bytes, writing the result into the provided array.
protected DecryptBlock ( byte block ) : void
block byte /// The block of bytes to be decrypted. ///
리턴 void

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed.

If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

protected Dispose ( bool disposing ) : void
disposing bool /// Indicates whether this method is being called by a user's code. ///
리턴 void

EncryptBlock() 보호된 메소드

Encrypts a single block of bytes, writing the result into the provided array.
protected EncryptBlock ( byte block ) : void
block byte /// The block of bytes to be encrypted. ///
리턴 void

ManagedTransformBase() 보호된 메소드

Creates a new managed transform instance, reading necessary setting values from the provided ISymmetricAlgorithm instance.
protected ManagedTransformBase ( ISymmetricAlgorithm algorithm, byte rgbIv, TransformDirection transformDirection, Endianness endianness ) : System
algorithm ISymmetricAlgorithm /// A instance from which to take /// setting values. ///
rgbIv byte /// The initialization vector to use. ///
transformDirection TransformDirection /// The direction of the transform (encryption or decryption). ///
endianness Endianness /// The endianness convention for the algorithm. ///
리턴 System

Reset() 보호된 메소드

Clears all potentially sensitive data stores.
protected Reset ( ) : void
리턴 void

TransformBlock() 공개 메소드

Transforms the specified region of the input byte array and copies the resulting transform to the specified region of the output byte array.
public TransformBlock ( byte inputBuffer, int inputOffset, int inputCount, byte outputBuffer, int outputOffset ) : int
inputBuffer byte /// The input for which to compute the transform. ///
inputOffset int /// The offset into the input byte array from which to begin using data. ///
inputCount int /// The number of bytes in the input byte array to use as data. ///
outputBuffer byte /// The output to which to write the transform. ///
outputOffset int /// The offset into the output byte array from which to begin writing /// data. ///
리턴 int

TransformFinalBlock() 공개 메소드

Transforms the specified region of the specified byte array.
public TransformFinalBlock ( byte inputBuffer, int inputOffset, int inputCount ) : byte[]
inputBuffer byte /// The input for which to compute the transform. ///
inputOffset int /// The offset into the byte array from which to begin using data. ///
inputCount int /// The number of bytes in the byte array to use as data. ///
리턴 byte[]