|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.security.XPCrypto
Main class used for cryptography operations.
Can be used to get a crypto instance to encrypt a string, i.e.:
Can be used to decrypt a string directly, i.e.(this will attempt to determine type of crypto used to encrypt):
Method Summary | |
static java.lang.String |
Decrypt(java.lang.String toDecrypt,
java.lang.String key)
Decrypts data. |
static IXPCrypto |
GetInstance(XPCryptoType type)
Gets an |
static IXPPKICrypto |
GetPKIInstance(XPPKICryptoType type)
Gets an |
static boolean |
UsesPKIEncrytion(java.lang.String toDecrypt)
Determines whether a string has been encrypted using PKI encryption. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static IXPCrypto GetInstance(XPCryptoType type)
type
- the type of crypto instance required
public static IXPPKICrypto GetPKIInstance(XPPKICryptoType type)
type
- the type of crypto instance required
public static java.lang.String Decrypt(java.lang.String toDecrypt, java.lang.String key)
toDecrypt
- the data to decryptkey
- the key to use to decrypt the data
XPIllegalArgumentException
- if the key or ciphertext to decrypt is null or empty.
XPCryptoException
- if the encrypted string appears to be encrypted with a PKI cipher.
XPNoSuchAlgorithmException
- (subtype of XPCryptoException) if the encryption method is not recognized.public static boolean UsesPKIEncrytion(java.lang.String toDecrypt)
toDecrypt
- the string which has been encryted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |