klyn.cryptography.PBEKeySpec.PBEKeySpec
constructor
public PBEKeySpec(password as String, salt as String, iterations as Int = 100000, sizeBytes as Int = 32, saltEncoding as String = "utf8"):
Description
Creates a password-based derivation specification.
import klyn.cryptography

spec = PBEKeySpec("password", "salty", 100000, 32)
print(spec.sizeBytes)
Parameters
  • password Source password interpreted as UTF-8.
  • salt Salt text or encoded value.
  • iterations PBKDF2 iteration count.
  • sizeBytes Requested output size in bytes.
  • saltEncoding Salt encoding: `utf8`, `hex`, `base64` or `base64url`. ```klyn import klyn.cryptography spec = PBEKeySpec("password", "salty", 100000, 32) print(spec.sizeBytes) ```