com.jscape.inet.ssh.transport.keyformat
Class RSAKeyFormat
java.lang.Object
com.jscape.inet.ssh.transport.keyformat.KeyFormat
com.jscape.inet.ssh.transport.keyformat.RSAKeyFormat
public class RSAKeyFormat
- extends KeyFormat
- Version:
- 1.0
- Author:
- Alex Usun
|
Field Summary |
static java.lang.String |
ALGORITHM
Field ALGORITHM |
static java.lang.String |
JAVA_ALGORITHM
Field JAVA_ALGORITHM |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALGORITHM
public static final java.lang.String ALGORITHM
- Field ALGORITHM
- See Also:
- Constant Field Values
JAVA_ALGORITHM
public static final java.lang.String JAVA_ALGORITHM
- Field JAVA_ALGORITHM
- See Also:
- Constant Field Values
RSAKeyFormat
public RSAKeyFormat()
getKeyFrom
public java.security.PublicKey getKeyFrom(byte[] data)
throws KeyFormatException
- Specified by:
getKeyFrom in class KeyFormat
- Parameters:
data -
- Returns:
- public key
- Throws:
KeyFormatException
format
public byte[] format(java.security.PublicKey key)
throws KeyFormatException
- Specified by:
format in class KeyFormat
- Parameters:
key -
- Returns:
- byte array order
- Throws:
KeyFormatException
getSignatureFrom
public byte[] getSignatureFrom(byte[] data)
throws KeyFormatException
- Specified by:
getSignatureFrom in class KeyFormat
- Parameters:
data -
- Returns:
- byte array order
- Throws:
KeyFormatException
sign
public byte[] sign(byte[] data,
java.security.PrivateKey key)
throws KeyFormatException
- Specified by:
sign in class KeyFormat
- Parameters:
data - key -
- Returns:
- byte array order
- Throws:
KeyFormatException
verifySignature
public void verifySignature(byte[] sign,
byte[] data,
java.security.PublicKey key)
throws KeyFormatException
- Specified by:
verifySignature in class KeyFormat
- Parameters:
sign - data - key -
- Throws:
KeyFormatException
generateKeyPair
public java.security.KeyPair generateKeyPair()
throws KeyFormatException
- Specified by:
generateKeyPair in class KeyFormat
- Returns:
- key pair
- Throws:
KeyFormatException
Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved