Méthode | Description | |
---|---|---|
CreateKey ( bool privatePublic ) : string |
Creates a new set of keys
|
|
Decrypt ( string input, string key, |
Decrypts a string using RSA
|
|
Encrypt ( string input, string key, |
Encrypts a string using RSA
|
|
SignHash ( string input, string key, string &hash, |
Takes a string and creates a signed hash of it
|
|
VerifyHash ( string hash, string signedHash, string key ) : bool |
Verifies a signed hash against the unsigned version
|
public static CreateKey ( bool privatePublic ) : string | ||
privatePublic | bool | True if private key should be included, false otherwise |
Résultat | string |
public static Decrypt ( string input, string key, |
||
input | string | Input string (should be small as anything over 128 bytes can not be decrypted) |
key | string | Key to use for decryption |
encodingUsing | Encoding that the result should use (defaults to UTF8) | |
Résultat | string |
public static Encrypt ( string input, string key, |
||
input | string | Input string (should be small as anything over 128 bytes can not be decrypted) |
key | string | Key to use for encryption |
encodingUsing | Encoding that the input string uses (defaults to UTF8) | |
Résultat | string |
public static SignHash ( string input, string key, string &hash, |
||
input | string | Input string |
key | string | Key to encrypt/sign with |
hash | string | This will be filled with the unsigned hash |
encodingUsing | Encoding that the input is using (defaults to UTF8) | |
Résultat | string |
public static VerifyHash ( string hash, string signedHash, string key ) : bool | ||
hash | string | The unsigned hash (should be 64bit string) |
signedHash | string | The signed hash (should be 64bit string) |
key | string | The key to use in decryption |
Résultat | bool |