klyn.cryptography.Signature.getInstance
method
public static getInstance(algorithm as String) as Signature throws CryptoException:
Description
Compatibility factory for dynamic algorithm selection. The preferred APIs are `RSAPSSSignature(SHA256())` and `RSAPKCS1Signature(SHA256())`.
import klyn.cryptography

signature = Signature.getInstance("SHA256withRSA/PSS")
print(signature.algorithm)
Parameters
  • algorithm Signature algorithm.
Returns
Ready-to-use signature instance.
Throws
  • CryptoException when the algorithm is unsupported. ```klyn import klyn.cryptography signature = Signature.getInstance("SHA256withRSA/PSS") print(signature.algorithm) ```