© 2002 BEA Systems, Inc.


com.beasys.commerce.ebusiness.security
Class EncryptorImpl

java.lang.Object
  |
  +--com.beasys.commerce.foundation.SessionImpl
        |
        +--com.beasys.commerce.ebusiness.security.EncryptorImpl

public class EncryptorImpl
extends SessionImpl

The EncryptorImpl is the implementation used by the Encryptor service.
Encryption does not require that the server be in a consistent state. This ensures that data gets encrypted and stored and in turn orders go through by default.

See Also:
Encryptor, EncryptorHome, Serialized Form

Fields inherited from class com.beasys.commerce.foundation.SessionImpl
_ctx, _environmentNamingContext, _environmentPropertyCache, _isDirty
 
Constructor Summary
EncryptorImpl()
           
 
Method Summary
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbPostCreate()
           
 void ejbRemove()
           
 java.lang.String encrypt(java.lang.String dataToEncrypt)
          Takes string of data to encrypt and returns a string of encrypted data.
 void setSessionContext(javax.ejb.SessionContext ctx)
           
 
Methods inherited from class com.beasys.commerce.foundation.SessionImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, getEnvironmentNamingContext, getEnvironmentProperty, getEnvironmentProperty, getEnvironmentPropertyCache, getPersistenceHelperPlugin, getSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncryptorImpl

public EncryptorImpl()
Method Detail

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException

Overrides:
ejbCreate in class SessionImpl

ejbPostCreate

public void ejbPostCreate()
                   throws javax.ejb.CreateException

Overrides:
ejbPostCreate in class SessionImpl

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException

Overrides:
ejbActivate in class SessionImpl

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException

Overrides:
ejbPassivate in class SessionImpl

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException

Overrides:
ejbRemove in class SessionImpl

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
                       throws javax.ejb.EJBException

Overrides:
setSessionContext in class SessionImpl

encrypt

public java.lang.String encrypt(java.lang.String dataToEncrypt)
                         throws InconsistentStateException
Takes string of data to encrypt and returns a string of encrypted data.
The encryption process involves getting an instance of the KeyFactory and retrieving the public key from it. The encrypted data, which is really a sequence of bytes is then base-64 encoded to convert it to a byte sequence that can be easily persisted.

Parameters:
dataToDecrypt - The encrypted string that needs to be decrypted.
Returns:
s string of decrypted data.
Throws:
InconsistentStateException - if the server is not initialized with decryption password.

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved