C# Class Pdelvo.Minecraft.Network.ProtocolSecurity

Show file Open project: pdelvo/Pdelvo.Minecraft

Public Methods

Method Description
ComputeHash ( ) : string
GenerateAes128Key ( ) : byte[]
GenerateRsaKeyPair ( RSACryptoServiceProvider &provider ) : RSAParameters
RsaDecrypt ( byte data, RSACryptoServiceProvider provider, bool isPrivate ) : byte[]
RsaDecrypt ( byte data, byte key, bool isPrivate ) : byte[]
RsaEncrypt ( byte data, byte key, bool isPrivate ) : byte[]

Private Methods

Method Description
GenerateRsaKey ( byte key, bool isPrivate ) : RSAParameters
GenerateRsaPublicKey ( byte key ) : RSAParameters

Method Details

ComputeHash() public static method

public static ComputeHash ( ) : string
return string

GenerateAes128Key() public static method

public static GenerateAes128Key ( ) : byte[]
return byte[]

GenerateRsaKeyPair() public static method

public static GenerateRsaKeyPair ( RSACryptoServiceProvider &provider ) : RSAParameters
provider System.Security.Cryptography.RSACryptoServiceProvider
return System.Security.Cryptography.RSAParameters

RsaDecrypt() public static method

public static RsaDecrypt ( byte data, RSACryptoServiceProvider provider, bool isPrivate ) : byte[]
data byte
provider System.Security.Cryptography.RSACryptoServiceProvider
isPrivate bool
return byte[]

RsaDecrypt() public static method

public static RsaDecrypt ( byte data, byte key, bool isPrivate ) : byte[]
data byte
key byte
isPrivate bool
return byte[]

RsaEncrypt() public static method

public static RsaEncrypt ( byte data, byte key, bool isPrivate ) : byte[]
data byte
key byte
isPrivate bool
return byte[]