org.apache.ftpserver.util
Class EncryptUtils

java.lang.Object
  extended by org.apache.ftpserver.util.EncryptUtils

public class EncryptUtils
extends Object

String encryption utility methods.

Author:
Rana Bhattacharyya

Constructor Summary
EncryptUtils()
           
 
Method Summary
static byte[] encrypt(byte[] source, String algorithm)
          Encrypt byte array.
static String encrypt(String source, String algorithm)
          Encrypt string
static String encryptMD5(String source)
          Encrypt string using MD5 algorithm
static String encryptSHA(String source)
          Encrypt string using SHA algorithm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncryptUtils

public EncryptUtils()
Method Detail

encrypt

public static byte[] encrypt(byte[] source,
                             String algorithm)
                      throws NoSuchAlgorithmException
Encrypt byte array.

Throws:
NoSuchAlgorithmException

encrypt

public static String encrypt(String source,
                             String algorithm)
                      throws NoSuchAlgorithmException
Encrypt string

Throws:
NoSuchAlgorithmException

encryptMD5

public static String encryptMD5(String source)
Encrypt string using MD5 algorithm


encryptSHA

public static String encryptSHA(String source)
Encrypt string using SHA algorithm



Copyright © 2001-2012 Codehaus. All Rights Reserved.