![]() |
Sylloge
A C# helper library
|
Inherited by Sylloge.Encryption.Aes.DecryptStream, Sylloge.Encryption.Aes.EncryptStream, Sylloge.Encryption.TripleDES.DecryptStream, and Sylloge.Encryption.TripleDES.EncryptStream.
Public Types | |
| enum | StreamType { Encrypt, Decrypt } |
| Defines the type method to which the stream will handle data (encrypt or decrypt) More... | |
| enum | AlgorithmType { AES, AES_Rijndael, TripleDES } |
| Defines the algorithm type used by the stream. More... | |
Public Member Functions | |
| BinaryStream (AlgorithmType algo, StreamType type, int blockSize, int keySize, string pass, byte[] salt) | |
| BinaryStream (AlgorithmType algo, StreamType type, int blockSize, int keySize, string pass, byte[] salt, CryptoStreamMode mode) | |
| BinaryStream (AlgorithmType algo, StreamType type, int blockSize, int keySize, byte[] key, byte[] iv) | |
| BinaryStream (AlgorithmType algo, StreamType type, int blockSize, int keySize, byte[] key, byte[] iv, CryptoStreamMode mode) | |
| void | Close () |
| void | Dispose () |
| Releases the unmanaged resources used by the stream and optionally releases the managed resources. | |
| void | Flush () |
| Clears all buffers for this stream and causes any buffered data to be written to the underlying device. | |
| int | Read (byte[] buffer, int offset, int count) |
| Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. | |
| int | ReadByte () |
| Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. | |
| void | WriteByte (byte value) |
| Writes a byte to the current position in the stream and advances the position within the stream by one byte. | |
| void | Write (byte[] buffer) |
| Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. | |
| void | Write (byte[] buffer, int offset, int count) |
| Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. | |
| byte[] | ToArray () |
| Returns the underlying stream data as a byte array. | |
Properties | |
| StreamType | Type [get, set] |
| Gets the type of encryption stream this is (encryptor or decryptor) | |
| AlgorithmType | Algorithm [get, set] |
| Gets the current algorithm this encryption stream is using. | |
| bool | CanRead [get] |
| Gets a value indicating whether the current stream is readable. | |
| bool | CanWrite [get] |
| Gets a value indicating whether the current stream is writeable. | |
Definition at line 9 of file BinaryStream.cs.
Defines the algorithm type used by the stream.
| AES |
Defines the AES algorithm will be used. |
| AES_Rijndael |
Defines the AES (Rijndael) algorithm will be used. |
| TripleDES |
Defines the TripleDES algorithm will be used. |
Definition at line 30 of file BinaryStream.cs.
Defines the type method to which the stream will handle data (encrypt or decrypt)
Definition at line 15 of file BinaryStream.cs.
| Sylloge.Encryption.BinaryStream.BinaryStream | ( | AlgorithmType | algo, |
| StreamType | type, | ||
| int | blockSize, | ||
| int | keySize, | ||
| string | pass, | ||
| byte[] | salt | ||
| ) |
Definition at line 59 of file BinaryStream.cs.
| Sylloge.Encryption.BinaryStream.BinaryStream | ( | AlgorithmType | algo, |
| StreamType | type, | ||
| int | blockSize, | ||
| int | keySize, | ||
| string | pass, | ||
| byte[] | salt, | ||
| CryptoStreamMode | mode | ||
| ) |
Definition at line 67 of file BinaryStream.cs.
| Sylloge.Encryption.BinaryStream.BinaryStream | ( | AlgorithmType | algo, |
| StreamType | type, | ||
| int | blockSize, | ||
| int | keySize, | ||
| byte[] | key, | ||
| byte[] | iv | ||
| ) |
Definition at line 75 of file BinaryStream.cs.
| Sylloge.Encryption.BinaryStream.BinaryStream | ( | AlgorithmType | algo, |
| StreamType | type, | ||
| int | blockSize, | ||
| int | keySize, | ||
| byte[] | key, | ||
| byte[] | iv, | ||
| CryptoStreamMode | mode | ||
| ) |
Definition at line 80 of file BinaryStream.cs.
| void Sylloge.Encryption.BinaryStream.Close | ( | ) |
Definition at line 101 of file BinaryStream.cs.
| void Sylloge.Encryption.BinaryStream.Dispose | ( | ) |
Releases the unmanaged resources used by the stream and optionally releases the managed resources.
Definition at line 112 of file BinaryStream.cs.
| void Sylloge.Encryption.BinaryStream.Flush | ( | ) |
Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
Definition at line 123 of file BinaryStream.cs.
| int Sylloge.Encryption.BinaryStream.Read | ( | byte[] | buffer, |
| int | offset, | ||
| int | count | ||
| ) |
Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
| buffer | An array of bytes. A maximum of count bytes are read from the current stream and stored in buffer. |
| offset | The byte offset in buffer at which to begin storing the data read from the current stream. |
| count | The maximum number of bytes to be read from the current stream. |
Definition at line 137 of file BinaryStream.cs.
| int Sylloge.Encryption.BinaryStream.ReadByte | ( | ) |
Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
Definition at line 147 of file BinaryStream.cs.
| byte [] Sylloge.Encryption.BinaryStream.ToArray | ( | ) |
Returns the underlying stream data as a byte array.
Definition at line 191 of file BinaryStream.cs.
| void Sylloge.Encryption.BinaryStream.Write | ( | byte[] | buffer | ) |
Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
| buffer | This method copies count bytes from buffer to the current stream. |
Definition at line 166 of file BinaryStream.cs.
| void Sylloge.Encryption.BinaryStream.Write | ( | byte[] | buffer, |
| int | offset, | ||
| int | count | ||
| ) |
Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
| buffer | This method copies count bytes from buffer to the current stream. |
| offset | The byte offset in buffer at which to begin copying bytes to the current stream |
| count | The number of bytes to be written to the current stream. |
Definition at line 179 of file BinaryStream.cs.
| void Sylloge.Encryption.BinaryStream.WriteByte | ( | byte | value | ) |
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
| value | The byte to write to the stream. |
Definition at line 156 of file BinaryStream.cs.
AlgorithmType Sylloge.Encryption.BinaryStream.Algorithm [get, set] |
Gets the current algorithm this encryption stream is using.
Definition at line 57 of file BinaryStream.cs.
bool Sylloge.Encryption.BinaryStream.CanRead [get] |
Gets a value indicating whether the current stream is readable.
Definition at line 89 of file BinaryStream.cs.
bool Sylloge.Encryption.BinaryStream.CanWrite [get] |
Gets a value indicating whether the current stream is writeable.
Definition at line 97 of file BinaryStream.cs.
StreamType Sylloge.Encryption.BinaryStream.Type [get, set] |
Gets the type of encryption stream this is (encryptor or decryptor)
Definition at line 53 of file BinaryStream.cs.
1.7.4