C# Class Renci.SshNet.Security.Cryptography.Cipher

Base class for cipher implementation.
Mostra file Open project: sshnet/SSH.NET

Public Methods

Method Description
Decrypt ( byte input ) : byte[]

Decrypts the specified input.

Decrypt ( byte input, int offset, int length ) : byte[]

Decrypts the specified input.

Encrypt ( byte input ) : byte[]

Encrypts the specified input.

Encrypt ( byte input, int offset, int length ) : byte[]

Encrypts the specified input.

Protected Methods

Method Description
BigEndianToUInt32 ( byte buffer ) : uint

Converts big endian bytes into number.

BigEndianToUInt32 ( byte buffer, int offset ) : uint

Converts big endian bytes into number.

BigEndianToUInt64 ( byte buffer ) : ulong

Converts big endian bytes into number.

BigEndianToUInt64 ( byte buffer, int offset ) : ulong

Converts big endian bytes into number.

LittleEndianToUInt32 ( byte buffer ) : uint

Converts little endian bytes into number.

LittleEndianToUInt32 ( byte buffer, int offset ) : uint

Converts little endian bytes into number.

LittleEndianToUInt64 ( byte buffer ) : ulong

Converts little endian bytes into number.

LittleEndianToUInt64 ( byte buffer, int offset ) : ulong

Converts little endian bytes into number.

UInt32ToBigEndian ( uint number, byte buffer ) : void

Populates buffer with big endian number representation.

UInt32ToBigEndian ( uint number, byte buffer, int offset ) : void

Populates buffer with big endian number representation.

UInt32ToLittleEndian ( uint number, byte buffer ) : void

Populates buffer with little endian number representation.

UInt32ToLittleEndian ( uint number, byte buffer, int offset ) : void

Populates buffer with little endian number representation.

UInt64ToBigEndian ( ulong number, byte buffer ) : void

Populates buffer with big endian number representation.

UInt64ToBigEndian ( ulong number, byte buffer, int offset ) : void

Populates buffer with big endian number representation.

UInt64ToLittleEndian ( ulong number, byte buffer ) : void

Populates buffer with little endian number representation.

UInt64ToLittleEndian ( ulong number, byte buffer, int offset ) : void

Populates buffer with little endian number representation.

Method Details

BigEndianToUInt32() protected static method

Converts big endian bytes into number.
protected static BigEndianToUInt32 ( byte buffer ) : uint
buffer byte The buffer.
return uint

BigEndianToUInt32() protected static method

Converts big endian bytes into number.
protected static BigEndianToUInt32 ( byte buffer, int offset ) : uint
buffer byte The buffer.
offset int The buffer offset.
return uint

BigEndianToUInt64() protected static method

Converts big endian bytes into number.
protected static BigEndianToUInt64 ( byte buffer ) : ulong
buffer byte The buffer.
return ulong

BigEndianToUInt64() protected static method

Converts big endian bytes into number.
protected static BigEndianToUInt64 ( byte buffer, int offset ) : ulong
buffer byte The buffer.
offset int The buffer offset.
return ulong

Decrypt() public abstract method

Decrypts the specified input.
public abstract Decrypt ( byte input ) : byte[]
input byte The input.
return byte[]

Decrypt() public abstract method

Decrypts the specified input.
public abstract Decrypt ( byte input, int offset, int length ) : byte[]
input byte The input.
offset int The zero-based offset in at which to begin decrypting.
length int The number of bytes to decrypt from .
return byte[]

Encrypt() public method

Encrypts the specified input.
public Encrypt ( byte input ) : byte[]
input byte The input.
return byte[]

Encrypt() public abstract method

Encrypts the specified input.
public abstract Encrypt ( byte input, int offset, int length ) : byte[]
input byte The input.
offset int The zero-based offset in at which to begin encrypting.
length int The number of bytes to encrypt from .
return byte[]

LittleEndianToUInt32() protected static method

Converts little endian bytes into number.
protected static LittleEndianToUInt32 ( byte buffer ) : uint
buffer byte The buffer.
return uint

LittleEndianToUInt32() protected static method

Converts little endian bytes into number.
protected static LittleEndianToUInt32 ( byte buffer, int offset ) : uint
buffer byte The buffer.
offset int The buffer offset.
return uint

LittleEndianToUInt64() protected static method

Converts little endian bytes into number.
protected static LittleEndianToUInt64 ( byte buffer ) : ulong
buffer byte The buffer.
return ulong

LittleEndianToUInt64() protected static method

Converts little endian bytes into number.
protected static LittleEndianToUInt64 ( byte buffer, int offset ) : ulong
buffer byte The buffer.
offset int The buffer offset.
return ulong

UInt32ToBigEndian() protected static method

Populates buffer with big endian number representation.
protected static UInt32ToBigEndian ( uint number, byte buffer ) : void
number uint The number to convert.
buffer byte The buffer.
return void

UInt32ToBigEndian() protected static method

Populates buffer with big endian number representation.
protected static UInt32ToBigEndian ( uint number, byte buffer, int offset ) : void
number uint The number to convert.
buffer byte The buffer.
offset int The buffer offset.
return void

UInt32ToLittleEndian() protected static method

Populates buffer with little endian number representation.
protected static UInt32ToLittleEndian ( uint number, byte buffer ) : void
number uint The number to convert.
buffer byte The buffer.
return void

UInt32ToLittleEndian() protected static method

Populates buffer with little endian number representation.
protected static UInt32ToLittleEndian ( uint number, byte buffer, int offset ) : void
number uint The number to convert.
buffer byte The buffer.
offset int The buffer offset.
return void

UInt64ToBigEndian() protected static method

Populates buffer with big endian number representation.
protected static UInt64ToBigEndian ( ulong number, byte buffer ) : void
number ulong The number to convert.
buffer byte The buffer.
return void

UInt64ToBigEndian() protected static method

Populates buffer with big endian number representation.
protected static UInt64ToBigEndian ( ulong number, byte buffer, int offset ) : void
number ulong The number to convert.
buffer byte The buffer.
offset int The buffer offset.
return void

UInt64ToLittleEndian() protected static method

Populates buffer with little endian number representation.
protected static UInt64ToLittleEndian ( ulong number, byte buffer ) : void
number ulong The number to convert.
buffer byte The buffer.
return void

UInt64ToLittleEndian() protected static method

Populates buffer with little endian number representation.
protected static UInt64ToLittleEndian ( ulong number, byte buffer, int offset ) : void
number ulong The number to convert.
buffer byte The buffer.
offset int The buffer offset.
return void