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)
Inherited Attributes
attributeInherited Attributes from KeyGenerator: algorithm
Inherited Properties
propertyInherited Properties 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.
Inherited Methods
methodInherited Methods from KeyGenerator: generateKey, getInstance, init, initialize, toString
methodInherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml