C# Class Yea.Encryption.ShiftExtensions

Extensions that deal with bit xoring
Mostrar archivo Open project: OxPatient/Rule-Engine

Public Methods

Method Description
Decrypt ( this data, byte key, bool oneTimePad ) : byte[]

Decrypts the data using a basic xor of the key (not very secure unless doing a one time pad)

Decrypt ( this data, string key, bool oneTimePad, Encoding encodingUsing = null ) : string

Decrypts the data using a basic xor of the key (not very secure unless doing a one time pad)

Encrypt ( this data, byte key, bool oneTimePad ) : byte[]

Encrypts the data using a basic xor of the key (not very secure unless doing a one time pad)

Encrypt ( this data, string key, bool oneTimePad, Encoding encodingUsing = null ) : string

Encrypts the data using a basic xor of the key (not very secure unless doing a one time pad)

XOr ( this input, string key, Encoding encodingUsing = null ) : string

XOrs two strings together, returning the result

Private Methods

Method Description
Process ( byte input, byte key ) : byte[]

Actually does the encryption/decryption

Method Details

Decrypt() public static method

Decrypts the data using a basic xor of the key (not very secure unless doing a one time pad)
public static Decrypt ( this data, byte key, bool oneTimePad ) : byte[]
data this Data to encrypt
key byte Key to use
oneTimePad bool Is this a one time pad?
return byte[]

Decrypt() public static method

Decrypts the data using a basic xor of the key (not very secure unless doing a one time pad)
public static Decrypt ( this data, string key, bool oneTimePad, Encoding encodingUsing = null ) : string
data this Data to decrypt
key string Key to use
oneTimePad bool Is this a one time pad?
encodingUsing System.Text.Encoding Encoding that the Data uses (defaults to UTF8)
return string

Encrypt() public static method

Encrypts the data using a basic xor of the key (not very secure unless doing a one time pad)
public static Encrypt ( this data, byte key, bool oneTimePad ) : byte[]
data this Data to encrypt
key byte Key to use
oneTimePad bool Is this a one time pad?
return byte[]

Encrypt() public static method

Encrypts the data using a basic xor of the key (not very secure unless doing a one time pad)
public static Encrypt ( this data, string key, bool oneTimePad, Encoding encodingUsing = null ) : string
data this Data to encrypt
key string Key to use
oneTimePad bool Is this a one time pad?
encodingUsing System.Text.Encoding Encoding that the Data uses (defaults to UTF8)
return string

XOr() public static method

XOrs two strings together, returning the result
public static XOr ( this input, string key, Encoding encodingUsing = null ) : string
input this Input string
key string Key to use
encodingUsing System.Text.Encoding Encoding that the data uses (defaults to UTF8)
return string