org.apache.juddi.cryptor
Class DefaultCryptor

java.lang.Object
  |
  +--org.apache.juddi.cryptor.DefaultCryptor
All Implemented Interfaces:
Cryptor

public class DefaultCryptor
extends java.lang.Object
implements Cryptor

Author:
Anou Manavalan

Constructor Summary
DefaultCryptor()
          Constructor for DefaultCryptor.
 
Method Summary
 byte[] decrypt(byte[] bytes)
          Decrypt the string
 java.lang.String decrypt(java.lang.String str)
          Decrypt the string
 byte[] encrypt(byte[] bytes)
          Encrypt the string
 java.lang.String encrypt(java.lang.String str)
          Encrypt the string
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCryptor

public DefaultCryptor()
               throws java.security.NoSuchAlgorithmException,
                      java.security.spec.InvalidKeySpecException
Constructor for DefaultCryptor.

Method Detail

encrypt

public java.lang.String encrypt(java.lang.String str)
                         throws javax.crypto.NoSuchPaddingException,
                                java.security.NoSuchAlgorithmException,
                                java.security.InvalidAlgorithmParameterException,
                                java.security.InvalidKeyException,
                                javax.crypto.IllegalBlockSizeException,
                                javax.crypto.BadPaddingException
Encrypt the string

Specified by:
encrypt in interface Cryptor
javax.crypto.NoSuchPaddingException
java.security.NoSuchAlgorithmException
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException

encrypt

public byte[] encrypt(byte[] bytes)
               throws javax.crypto.NoSuchPaddingException,
                      java.security.NoSuchAlgorithmException,
                      java.security.InvalidAlgorithmParameterException,
                      java.security.InvalidKeyException,
                      javax.crypto.IllegalBlockSizeException,
                      javax.crypto.BadPaddingException
Description copied from interface: Cryptor
Encrypt the string

Specified by:
encrypt in interface Cryptor
javax.crypto.NoSuchPaddingException
java.security.NoSuchAlgorithmException
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException

decrypt

public java.lang.String decrypt(java.lang.String str)
                         throws javax.crypto.NoSuchPaddingException,
                                java.security.NoSuchAlgorithmException,
                                java.security.InvalidAlgorithmParameterException,
                                java.security.InvalidKeyException,
                                javax.crypto.IllegalBlockSizeException,
                                javax.crypto.BadPaddingException
Decrypt the string

Specified by:
decrypt in interface Cryptor
javax.crypto.NoSuchPaddingException
java.security.NoSuchAlgorithmException
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException

decrypt

public byte[] decrypt(byte[] bytes)
               throws javax.crypto.NoSuchPaddingException,
                      java.security.NoSuchAlgorithmException,
                      java.security.InvalidAlgorithmParameterException,
                      java.security.InvalidKeyException,
                      javax.crypto.IllegalBlockSizeException,
                      javax.crypto.BadPaddingException
Description copied from interface: Cryptor
Decrypt the string

Specified by:
decrypt in interface Cryptor
javax.crypto.NoSuchPaddingException
java.security.NoSuchAlgorithmException
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
java.lang.Exception


Copyright © 2003 Apache Software Foundation. All rights reserved.