public abstract class KeyPairGenerator extends Object:
Abstract base class for asymmetric key-pair generators.
The primary public RSA API is exposed through RSAKeyPairGenerator.
import klyn.cryptography generator as KeyPairGenerator = RSAKeyPairGenerator() generator.initialize(2048) print(generator.generateKeyPair().bits)
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly | algorithmalgorithm as String |
Canonical algorithm name. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | generateKeyPairgenerateKeyPair() as RSAKeyPair throws CryptoException: |
Generates a key pair. |
| public static | getInstancegetInstance(algorithm as String) as KeyPairGenerator throws CryptoException: |
Compatibility factory for dynamic algorithm selection. |
| public | initinit(bits as Int) as Void throws CryptoException: |
Short alias for `initialize`. |
| public | initializeinitialize(bits as Int) as Void throws CryptoException: |
Configures the key size. |
| public override | toStringtoString() as String: |
No summary. |