ants.p2p.query.security
Class AsymmetricProvider
java.lang.Object
ants.p2p.query.security.AsymmetricProvider
public class AsymmetricProvider
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RSAKEYSIZE
public static final int RSAKEYSIZE
- See Also:
- Constant Field Values
RSACERTAINTY
public static final int RSACERTAINTY
- See Also:
- Constant Field Values
AsymmetricProvider
public AsymmetricProvider(PublicHeader ph)
throws java.lang.Exception
- Throws:
java.lang.Exception
AsymmetricProvider
public AsymmetricProvider(boolean generate)
throws java.lang.Exception
- Throws:
java.lang.Exception
storeMessageHeader
public void storeMessageHeader()
throws java.lang.Exception
- Throws:
java.lang.Exception
loadMessageHeader
public void loadMessageHeader()
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
getPublicHeader
public PublicHeader getPublicHeader()
encryptMessage
public java.lang.String encryptMessage(java.lang.String message)
decryptMessage
public java.lang.String decryptMessage(java.lang.String message,
java.lang.String sessionKey)
throws java.lang.Exception
- Throws:
java.lang.Exception
getDecCipher
public javax.crypto.Cipher getDecCipher(java.lang.String encryptedSessionKey)
throws java.lang.Exception
- Throws:
java.lang.Exception