Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2003 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.commerce.ebusiness.security
Class DecryptorImpl

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

All Implemented Interfaces:
  EnterpriseBean, Serializable, SessionBean

public class DecryptorImpl
extends SessionImpl

The `DecryptorImpl` is the implementation used by the `Decryptor` service.
It uses RSA standard private key encryption for the implementation. The server should be in a consistent state before decryption services can be provided. If decryption services are requested of the `Decryptor` before the server is appropriately initialized, it throws an `InconsistentStateException`.

See Also:
  `DecryptorHome`, `DecryptorImpl`, Serialized Form

Field Summary

Fields inherited from class com.beasys.commerce.foundation.SessionImpl
`_ctx, _environmentNamingContext, _environmentPropertyCache, _isDirty`

Constructor Summary
`DecryptorImpl()`

Method Summary
`String` | `decrypt(String dataToDecrypt)` Takes a byte string of data to decrypt and returns a string of plain text.
`void` | `ejbActivate()` ejbActivate method.
`void` | `ejbCreate()` ejbCreate method.
`void` | `ejbPassivate()` ejbPassivate method.
`void` | `ejbPostCreate()` ejbPostCreate method.
`void` | `ejbRemove()` ejbRemove method.
`void` | `setSessionContext(SessionContext ctx)` setSessionContext method.

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

### DecryptorImpl

    public DecryptorImpl()

Method Detail

### ejbCreate

    public void ejbCreate()
                   throws CreateException

  Description copied from class: `SessionImpl`
  ejbCreate method.

  Overrides:
    `ejbCreate` in class `SessionImpl`
    `CreateException`

### ejbPostCreate

    public void ejbPostCreate()
                       throws CreateException

  Description copied from class: `SessionImpl`
  ejbPostCreate method.

  Overrides:
    `ejbPostCreate` in class `SessionImpl`
    `CreateException`

### ejbActivate

    public void ejbActivate()
                     throws EJBException

  Description copied from class: `SessionImpl`
  ejbActivate method.

  Specified by:
    `ejbActivate` in interface `SessionBean`
  Overrides:
    `ejbActivate` in class `SessionImpl`
    `EJBException`

### ejbPassivate

    public void ejbPassivate()
                      throws EJBException

  Description copied from class: `SessionImpl`
  ejbPassivate method.

  Specified by:
    `ejbPassivate` in interface `SessionBean`
  Overrides:
    `ejbPassivate` in class `SessionImpl`
    `EJBException`

### ejbRemove

    public void ejbRemove()
                   throws EJBException

  Description copied from class: `SessionImpl`
  ejbRemove method.

  Specified by:
    `ejbRemove` in interface `SessionBean`
  Overrides:
    `ejbRemove` in class `SessionImpl`
    `EJBException`

### setSessionContext

    public void setSessionContext(SessionContext ctx)
                           throws EJBException

  Description copied from class: `SessionImpl`
  setSessionContext method.

  Specified by:
    `setSessionContext` in interface `SessionBean`
  Overrides:
    `setSessionContext` in class `SessionImpl`
    `EJBException`

### decrypt

    public String decrypt(String dataToDecrypt)
                   throws InconsistentStateException

  Takes a byte string of data to decrypt and returns a string of plain text.
  The decryption process involves getting an instance of the KeyFactory and retrieving the private key from it. The encrypted data, which is really a base-64 encoded string, is then decoded to convert it to the byte sequence that the `Encryptor` returned as a result of the encryption process. This byte sequence is then passed on the decryption routine to get back the original text. A `SystemException` is thrown if the string being decrypted was encrypted using a public key that is not part of the key pair that the private key is a part of.

  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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2003 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 BEA Systems, Inc. All Rights Reserved