KeyGenerator
class in package klyn.cryptography

    public abstract class KeyGenerator extends Object:

Object
└ KeyGenerator

Abstract base class for symmetric key generators.

The primary public AES API is exposed through `AESKeyGenerator`.

    import klyn.cryptography

    generator as KeyGenerator = AESKeyGenerator()
    generator.initialize(256)
    print(generator.generateKey())

Fields

Modifier and Type | Member | Description
--- | --- | ---
public readonly | algorithm `algorithm as String` | Canonical algorithm name.

Inherited Properties
property Inherited Properties from Object: type
Methods

Modifier and Type | Member | Description
--- | --- | ---
public | generateKey `generateKey() as String throws CryptoException:` | Generates a ready-to-use encoded secret key.
public static | getInstance `getInstance(algorithm as String) as KeyGenerator throws CryptoException:` | Compatibility factory for dynamic algorithm selection.
public | init `init(sizeBits as Int) as Void throws CryptoException:` | Short alias for `initialize`.
public | initialize `initialize(sizeBits as Int) as Void throws CryptoException:` | Configures the generated key size.
public override | toString `toString() as String:` | No summary.

Inherited Methods
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml