C# Class SteamKit2.CryptoHelper

Provides Crypto functions used in Steam protocols
Mostra file Open project: Top-Cat/SteamBot Class Usage Examples

Public Methods

Method Description
AESDecrypt ( byte input, byte key, byte iv ) : byte[]

Decrypts an input byte array using AES/CBC/PKCS7 with a given key and IV

AESEncrypt ( byte input, byte key, byte iv ) : byte[]

Encrypts using AES/CBC/PKCS7 an input byte array with a given key and IV

AdlerHash ( byte input ) : byte[]

Performs an Adler32 on the given input

CRCHash ( byte input ) : byte[]

Performs CRC32 on an input byte array using the CrcStandard.Crc32Bit parameters

GenerateRandomBlock ( int size ) : byte[]

Generate an array of random bytes given the input length

JenkinsHash ( byte input ) : byte[]

Performs the Jenkins hash on an input byte array

SHAHash ( byte input ) : byte[]

Performs an SHA1 hash of an input byte array

SymmetricDecrypt ( byte input, byte key ) : byte[]

Decrypts using AES/CBC/PKCS7 with an input byte array and key, using the random IV prepended using AES/ECB/None

SymmetricEncrypt ( byte input, byte key ) : byte[]

Performs an encryption using AES/CBC/PKCS7 with an input byte array and key, with a random IV prepended using AES/ECB/None

Method Details

AESDecrypt() public static method

Decrypts an input byte array using AES/CBC/PKCS7 with a given key and IV
public static AESDecrypt ( byte input, byte key, byte iv ) : byte[]
input byte
key byte
iv byte
return byte[]

AESEncrypt() public static method

Encrypts using AES/CBC/PKCS7 an input byte array with a given key and IV
public static AESEncrypt ( byte input, byte key, byte iv ) : byte[]
input byte
key byte
iv byte
return byte[]

AdlerHash() public static method

Performs an Adler32 on the given input
public static AdlerHash ( byte input ) : byte[]
input byte
return byte[]

CRCHash() public static method

Performs CRC32 on an input byte array using the CrcStandard.Crc32Bit parameters
public static CRCHash ( byte input ) : byte[]
input byte
return byte[]

GenerateRandomBlock() public static method

Generate an array of random bytes given the input length
public static GenerateRandomBlock ( int size ) : byte[]
size int
return byte[]

JenkinsHash() public static method

Performs the Jenkins hash on an input byte array
public static JenkinsHash ( byte input ) : byte[]
input byte
return byte[]

SHAHash() public static method

Performs an SHA1 hash of an input byte array
public static SHAHash ( byte input ) : byte[]
input byte
return byte[]

SymmetricDecrypt() public static method

Decrypts using AES/CBC/PKCS7 with an input byte array and key, using the random IV prepended using AES/ECB/None
public static SymmetricDecrypt ( byte input, byte key ) : byte[]
input byte
key byte
return byte[]

SymmetricEncrypt() public static method

Performs an encryption using AES/CBC/PKCS7 with an input byte array and key, with a random IV prepended using AES/ECB/None
public static SymmetricEncrypt ( byte input, byte key ) : byte[]
input byte
key byte
return byte[]