SecretKeyFactory
classin packageklyn.cryptography
public abstract class SecretKeyFactory extends Object
└ SecretKeyFactory

Abstract base class for secret-key derivation algorithms.

The primary password-based derivation API is exposed through PBKDF2.

import klyn.cryptography

factory as SecretKeyFactory = PBKDF2(SHA256())
spec = PBEKeySpec("password", "salty", 100000, 32)
print(factory.generateSecret(spec))
Fields
Modifier and Type Member Description
public readonly algorithm
algorithm as String
Canonical factory algorithm name.
Inherited Properties
propertyInherited Properties from Object: type
Methods
Modifier and Type Member Description
public generateSecret
generateSecret(spec as PBEKeySpec) as String throws CryptoException
Derives key material from a password-based specification.
public generateSecret
generateSecret(spec as PBEKeySpec, outputEncoding as String) as String throws CryptoException
Performs a cryptographic operation.
public static getInstance
getInstance(algorithm as String) as SecretKeyFactory throws CryptoException
Compatibility factory for dynamic algorithm selection.
public override toString
toString() as String
No summary.
Inherited Methods
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml