AESKeyGenerator
classin packageklyn.cryptography
public class AESKeyGenerator extends KeyGenerator:
└ AESKeyGenerator

AES secret-key generator.

Generated keys are returned as Base64 strings so they can be passed directly to Cipher.aesEncrypt(...).

import klyn.cryptography

generator = AESKeyGenerator()
generator.initialize(256)
key = generator.generateKey()
print(key)
Attributes inherited from KeyGenerator: algorithm
Properties inherited from Object: type
Constructors
Modifier and Type Member Description
public AESKeyGenerator Creates a new AES key generator.
Methods
Modifier and Type Member Description
public override generateKey
generateKey() as String throws CryptoException:
Performs a cryptographic operation.
public override initialize
initialize(sizeBits as Int) as Void throws CryptoException:
Performs a cryptographic operation.
Methods inherited from KeyGenerator: generateKey, getInstance, init, initialize, toString
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml