C# Class OpenStory.Cryptography.LoginCrypto

Provides methods for the legacy login password encryption.
Mostra file Open project: shoftee/OpenStory

Public Methods

Method Description
GeneratePatchLocation ( short version, byte subversion, bool remove ) : int

Generates an integer for the "patch location" value sent during handshake.

GetMd5HashString ( string str, bool lowercase = false ) : string

Returns an MD5 hash string for a given string.

RsaEncryptPassword ( string password, RSAParameters parameters ) : string

Returns an RSA-encrypted MD5 hash of the given password, using the given RSAParameters.

Private Methods

Method Description
GetRsaWithParameters ( RSAParameters parameters ) : RSA

Method Details

GeneratePatchLocation() public static method

Generates an integer for the "patch location" value sent during handshake.
public static GeneratePatchLocation ( short version, byte subversion, bool remove ) : int
version short The game version.
subversion byte The game sub-version.
remove bool Whether to remove. Something.
return int

GetMd5HashString() public static method

Returns an MD5 hash string for a given string.
public static GetMd5HashString ( string str, bool lowercase = false ) : string
str string The string to hash.
lowercase bool Whether to return lowercase hex digits or not. Default value is .
return string

RsaEncryptPassword() public static method

Returns an RSA-encrypted MD5 hash of the given password, using the given RSAParameters.
public static RsaEncryptPassword ( string password, RSAParameters parameters ) : string
password string The password string to encrypt.
parameters System.Security.Cryptography.RSAParameters The parameters to use for the encryption.
return string