com.mindbright.ssh2
public final class SSH2RSA extends SSH2SimpleSignature
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SSH2_KEY_FORMAT |
draftIncompatibleSignature, signatureAlgorithm, ssh2KeyFormat
algorithm, pubKeyBlob, publicKey, signature
Constructor and Description |
---|
SSH2RSA() |
Modifier and Type | Method and Description |
---|---|
java.security.PublicKey |
decodePublicKey(byte[] pubKeyBlob)
Decode a public key encoded according to the ssh standard.
|
byte[] |
encodePublicKey(java.security.PublicKey publicKey)
Encode the given public key according to the ssh standard.
|
decodeSignature, encodeSignature, getKeyFormat, getSignatureAlgorithm, getVerifyInstance, setIncompatibility
clearSensitiveData, getAlgorithmName, getEncodingInstance, getInstance, getPublicKey, getPublicKeyBlob, initSign, initVerify, initVerify, setPublicKey, sign, verify
public static final java.lang.String SSH2_KEY_FORMAT
public byte[] encodePublicKey(java.security.PublicKey publicKey) throws SSH2Exception
encodePublicKey
in class SSH2Signature
publicKey
- The public key to encode. Must be an instance of
RSAPublicKey
.SSH2Exception
public java.security.PublicKey decodePublicKey(byte[] pubKeyBlob) throws SSH2Exception
decodePublicKey
in class SSH2Signature
pubKeyBlob
- A byte array containing a public key blob.Publickey
instance.SSH2Exception