Class SignatureRSA
java.lang.Object
net.schmizz.sshj.signature.AbstractSignature
net.schmizz.sshj.signature.SignatureRSA
- All Implemented Interfaces:
Signature
RSA
Signature-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class AbstractSignature
signature -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]encode(byte[] signature) Encode the signature as blogvoidinitVerify(PublicKey publicKey) Initialize this signature with the given public key for signature verification.booleanverify(byte[] sig) Verify against the given signature.Methods inherited from class AbstractSignature
extractSig, getSignatureName, initSign, sign, update, update
-
Field Details
-
keyType
-
-
Constructor Details
-
SignatureRSA
-
-
Method Details
-
initVerify
Description copied from interface:SignatureInitialize this signature with the given public key for signature verification. Note that subsequent calls to eitherSignature.initVerify(PublicKey)orSignature.initSign(PrivateKey)will overwrite prior initialization.- Specified by:
initVerifyin interfaceSignature- Overrides:
initVerifyin classAbstractSignature- Parameters:
publicKey- the public key to use for signature verification
-
encode
public byte[] encode(byte[] signature) Description copied from interface:SignatureEncode the signature as blog- Parameters:
signature- the signature to encode- Returns:
- Encoded signature
-
verify
public boolean verify(byte[] sig) Description copied from interface:SignatureVerify against the given signature.- Parameters:
sig- the signature to verify against- Returns:
trueon successful verification,falseon failure
-