C# Class TLSharp.Core.Utils.Helpers

Show file Open project: sochix/TLSharp

Public Methods

Method Description
CalcKey ( byte sharedKey, byte msgKey, bool client ) : AESKeyData
CalcMsgKey ( byte data ) : byte[]
CalcMsgKey ( byte data, int offset, int limit ) : byte[]
GenerateRandomBytes ( int num ) : byte[]
GenerateRandomLong ( ) : long
GenerateRandomUlong ( ) : ulong
sha1 ( byte data ) : byte[]
sha1 ( byte data, int offset, int limit ) : byte[]

Method Details

CalcKey() public static method

public static CalcKey ( byte sharedKey, byte msgKey, bool client ) : AESKeyData
sharedKey byte
msgKey byte
client bool
return TLSharp.Core.MTProto.Crypto.AESKeyData

CalcMsgKey() public static method

public static CalcMsgKey ( byte data ) : byte[]
data byte
return byte[]

CalcMsgKey() public static method

public static CalcMsgKey ( byte data, int offset, int limit ) : byte[]
data byte
offset int
limit int
return byte[]

GenerateRandomBytes() public static method

public static GenerateRandomBytes ( int num ) : byte[]
num int
return byte[]

GenerateRandomLong() public static method

public static GenerateRandomLong ( ) : long
return long

GenerateRandomUlong() public static method

public static GenerateRandomUlong ( ) : ulong
return ulong

sha1() public static method

public static sha1 ( byte data ) : byte[]
data byte
return byte[]

sha1() public static method

public static sha1 ( byte data, int offset, int limit ) : byte[]
data byte
offset int
limit int
return byte[]