electric.soap.security.encryption.xml
Class XMLEncryption

java.lang.Object
  extended byelectric.soap.security.encryption.xml.XMLEncryption
Direct Known Subclasses:
WSSEncryption

public class XMLEncryption
extends java.lang.Object

XMLEncryption specifies the details of how to encrypt or decrypt xml.

Author:
webMethods

Field Summary
protected  java.lang.String algorithm
           
protected  IRealm realm
           
protected  ElementReference reference
           
protected  byte[] secretKeyBytes
           
protected  java.lang.String userName
           
 
Constructor Summary
XMLEncryption()
           
 
Method Summary
 java.lang.String getAlgorithm()
           
 java.security.cert.X509Certificate getCertificate()
           
 NodeSet getDecryptedNodes()
           
 java.lang.String getKeyName()
           
 java.security.PrivateKey getPrivateKey()
           
 java.security.PublicKey getPublicKey()
           
 IRealm getRealm()
           
 ElementReference getReference()
           
 javax.crypto.SecretKey getSecretKey()
           
 byte[] getSecretKeyBytes()
           
 void setAlgorithm(java.lang.String algorithm)
           
 void setCertificate(java.security.cert.X509Certificate certificate)
           
 void setDecryptedNodes(NodeSet decryptedNodes)
           
 void setKeyName(java.lang.String userName)
           
 void setPrivateKey(java.security.PrivateKey privateKey)
           
 void setPublicKey(java.security.PublicKey publicKey)
           
 void setRealm(IRealm realm)
           
 void setReference(ElementReference reference)
           
 void setSecretKey(javax.crypto.SecretKey secretKey)
           
 void setSecretKeyBytes(byte[] secretKeyBytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reference

protected ElementReference reference

algorithm

protected java.lang.String algorithm

secretKeyBytes

protected byte[] secretKeyBytes

realm

protected IRealm realm

userName

protected java.lang.String userName
Constructor Detail

XMLEncryption

public XMLEncryption()
Method Detail

setReference

public void setReference(ElementReference reference)
Parameters:
reference -

getReference

public ElementReference getReference()
Returns:
pointer to the element to be encrypted/decrypted.

setCertificate

public void setCertificate(java.security.cert.X509Certificate certificate)
Parameters:
certificate -

getCertificate

public java.security.cert.X509Certificate getCertificate()
Returns:
a certificate, or null.

getPrivateKey

public java.security.PrivateKey getPrivateKey()
Returns:
the privateKey associated with this encryption spec.

setPrivateKey

public void setPrivateKey(java.security.PrivateKey privateKey)
Parameters:
privateKey -

getPublicKey

public java.security.PublicKey getPublicKey()

setPublicKey

public void setPublicKey(java.security.PublicKey publicKey)
Parameters:
publicKey -

getSecretKey

public javax.crypto.SecretKey getSecretKey()
Returns:
the secret key associated with this encryption spec.

setSecretKey

public void setSecretKey(javax.crypto.SecretKey secretKey)
Parameters:
secretKey -

getSecretKeyBytes

public byte[] getSecretKeyBytes()
Returns:

setSecretKeyBytes

public void setSecretKeyBytes(byte[] secretKeyBytes)
Parameters:
secretKeyBytes -

getRealm

public IRealm getRealm()
Returns:
the realm associated with this encryption spec.

setRealm

public void setRealm(IRealm realm)
Parameters:
realm -

getAlgorithm

public java.lang.String getAlgorithm()
Returns:
the WS-Security algorithm name.

setAlgorithm

public void setAlgorithm(java.lang.String algorithm)
Parameters:
algorithm -

getKeyName

public java.lang.String getKeyName()
Returns:
the key name from the KeyInfo element.

setKeyName

public void setKeyName(java.lang.String userName)
Parameters:
userName -

getDecryptedNodes

public NodeSet getDecryptedNodes()
Returns:
the original encrypted node.

setDecryptedNodes

public void setDecryptedNodes(NodeSet decryptedNodes)
Parameters:
decryptedNodes -


copyright© 2001-2004 by webMethods All Rights Reserved.