RSAPKCS1Signature
classin packageklyn.cryptography
public class RSAPKCS1Signature extends Signature:
└ RSAPKCS1Signature
RSA PKCS#1 v1.5 signature implementation parameterized by a concrete digest.
import klyn.cryptography

keys = RSAKeyPairGenerator().generateKeyPair()
signer = RSAPKCS1Signature(SHA256())
signer.initSign(keys.privateKeyPem)
token = signer.sign("hello")
verifier = RSAPKCS1Signature(SHA256())
verifier.initVerify(keys.publicKeyPem)
print(verifier.verify(token, "hello"))
Attributes inherited from Signature: algorithm, hashAlgorithm, padding
Properties inherited from Object: type
Constructors
Modifier and Type Member Description
public RSAPKCS1Signature Creates an RSA PKCS#1 v1.
public RSAPKCS1Signature Creates an RSA PKCS#1 v1.
Methods inherited from Signature: getInstance, initSign, initVerify, reset, sign, toString, update, verify
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml