org.apache.geronimo.gshell.remote.crypto
Class CryptoContext

java.lang.Object
  extended by org.apache.geronimo.gshell.remote.crypto.CryptoContext

@Component(role=CryptoContext.class)
public class CryptoContext
extends Object

Provides an abstraction of the crypto bits which are required for some remote shell communications.

Version:
$Rev: 577065 $ $Date: 2007-09-18 14:04:33 -0700 (Tue, 18 Sep 2007) $

Constructor Summary
CryptoContext()
           
 
Method Summary
 byte[] decrypt(byte[] bytes)
           
 byte[] decrypt(Key key, byte[] bytes)
           
 PublicKey deserializePublicKey(byte[] bytes)
           
 byte[] encrypt(byte[] bytes)
           
 byte[] encrypt(Key key, byte[] bytes)
           
 PublicKey getPublicKey()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CryptoContext

public CryptoContext()
              throws Exception
Throws:
Exception
Method Detail

getPublicKey

public PublicKey getPublicKey()

encrypt

public byte[] encrypt(Key key,
                      byte[] bytes)
               throws Exception
Throws:
Exception

encrypt

public byte[] encrypt(byte[] bytes)
               throws Exception
Throws:
Exception

decrypt

public byte[] decrypt(Key key,
                      byte[] bytes)
               throws Exception
Throws:
Exception

decrypt

public byte[] decrypt(byte[] bytes)
               throws Exception
Throws:
Exception

deserializePublicKey

public PublicKey deserializePublicKey(byte[] bytes)
                               throws Exception
Throws:
Exception


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.