|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.security.opt.impl.enc.CryptoProcessor
public class CryptoProcessor
| Field Summary | |
|---|---|
protected Cipher |
cipher
|
protected Data |
data
|
protected Key |
key
|
| Constructor Summary | |
|---|---|
CryptoProcessor()
|
|
CryptoProcessor(int mode,
String algo,
Data ed,
Key key)
Creates a new instance of EncryptionProcessor |
|
CryptoProcessor(int mode,
String algo,
Key key)
|
|
CryptoProcessor(int mode,
String algo,
Key dk,
Key key)
|
|
| Method Summary | |
|---|---|
protected String |
convertAlgURIToTransformation(String algorithmURI)
Convert algorithm URI to actual transformation (DES/CBC/PKCS5Padding) |
byte[] |
decryptData(byte[] encryptedContent)
decrypts the encryptedContent which a byte[] |
InputStream |
decryptData(InputStream is)
decrypts the given data which is of the form InputStream |
Key |
decryptKey(byte[] encryptedKey,
String encAlgo)
decrypts the encrypted key which is a byte[] with encAlgo algorithm |
void |
encrypt(OutputStream outputStream)
encrypts outputStream |
byte[] |
encryptData(byte[] cipherInput)
initialises the Cipher and encrypts the data which is a byte[] and returns the encrypted data |
void |
encryptData(OutputStream eos)
initialises the Cipher and encrypts the data which is a OutputStream and writes the encrypted data into the data member |
void |
encryptKey(OutputStream outputStream)
wraps the data encryption key to byte[] and writes it to output stream |
protected String |
getAlgorithm()
|
byte[] |
getCipherValueOfEK()
wraps the data encryption key . |
protected Key |
getKey()
|
protected void |
initCipher()
creates an instance of javax.crypto.Cipher class and inits it . |
void |
setEncryptedDataCV(byte[] cv)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Cipher cipher
protected Key key
protected Data data
| Constructor Detail |
|---|
public CryptoProcessor()
public CryptoProcessor(int mode,
String algo,
Data ed,
Key key)
throws XWSSecurityException
XWSSecurityException
public CryptoProcessor(int mode,
String algo,
Key dk,
Key key)
throws XWSSecurityException
XWSSecurityException
public CryptoProcessor(int mode,
String algo,
Key key)
throws XWSSecurityException
XWSSecurityException| Method Detail |
|---|
protected void initCipher()
throws NoSuchAlgorithmException,
NoSuchPaddingException,
InvalidKeyException
NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyExceptionprotected String getAlgorithm()
protected String convertAlgURIToTransformation(String algorithmURI)
algorithmURI -
protected Key getKey()
public void encrypt(OutputStream outputStream)
throws IOException
outputStream -
IOExceptionpublic byte[] getCipherValueOfEK()
public void encryptKey(OutputStream outputStream)
throws IOException
outputStream - OutputStream
IOExceptionpublic void setEncryptedDataCV(byte[] cv)
public byte[] encryptData(byte[] cipherInput)
cipherInput - byte[]
public void encryptData(OutputStream eos)
throws IOException
eos - OutputStream
IOException
public Key decryptKey(byte[] encryptedKey,
String encAlgo)
throws IOException
encryptedKey - byte[]encAlgo - String
IOException
public InputStream decryptData(InputStream is)
throws IOException
is - InputStream
IOException
public byte[] decryptData(byte[] encryptedContent)
throws IOException
encryptedContent - byte[]
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||