Appearance
GenerateRsaKeyPair Method
Definition
- Namespace:
JASE.Crypto - Assembly:
JASE.Crypto.dll
Overloads
| Name | Description |
|---|---|
bool GenerateRsaKeyPair(out byte[] publicKey, out byte[] privateKey, int keySize) | Generates a new RSA key pair and returns the keys as raw byte arrays. |
bool GenerateRsaKeyPair(out string publicKey, out string privateKey, int keySize) | Generates a new RSA key pair and returns the keys as XML-formatted strings. |
bool GenerateRsaKeyPair(out byte[] publicKey, out byte[] privateKey, int keySize)
csharp
bool GenerateRsaKeyPair(out byte[] publicKey, out byte[] privateKey, int keySize)Generates a new RSA key pair and returns the keys as raw byte arrays.
Parameters
| Name | Description |
|---|---|
keySize | The size of the RSA key to generate (in bits). Common sizes are 2048, 3072, or 4096. |
privateKey | The output parameter that will contain the private key in raw binary format. |
publicKey | The output parameter that will contain the public key in raw binary format. |
Returns
True if the keys were successfully generated; otherwise, false.
bool GenerateRsaKeyPair(out string publicKey, out string privateKey, int keySize)
csharp
bool GenerateRsaKeyPair(out string publicKey, out string privateKey, int keySize)Generates a new RSA key pair and returns the keys as XML-formatted strings.
Parameters
| Name | Description |
|---|---|
keySize | The size of the RSA key to generate (in bits). Common sizes are 2048, 3072, or 4096. |
privateKey | The output parameter that will contain the private key in XML format. |
publicKey | The output parameter that will contain the public key in XML format. |
Returns
True if the keys were successfully generated; otherwise, false.