Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.util
Class Sha1Crypto

java.lang.Object
  extended by net.java.sip.communicator.util.Sha1Crypto

public class Sha1Crypto
extends Object


Constructor Summary
Sha1Crypto()
           
 
Method Summary
static String encode(byte[] byteArray)
          Encodes the given text with the SHA-1 algorithm.
static String encode(String text)
          Encodes the given text with the SHA-1 algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sha1Crypto

public Sha1Crypto()
Method Detail

encode

public static String encode(String text)
                     throws NoSuchAlgorithmException,
                            UnsupportedEncodingException
Encodes the given text with the SHA-1 algorithm.

Parameters:
text - the text to encode
Returns:
the encoded text
Throws:
NoSuchAlgorithmException
UnsupportedEncodingException

encode

public static String encode(byte[] byteArray)
                     throws NoSuchAlgorithmException,
                            UnsupportedEncodingException
Encodes the given text with the SHA-1 algorithm.

Parameters:
byteArray - the byte array to encode
Returns:
the encoded text
Throws:
NoSuchAlgorithmException
UnsupportedEncodingException

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.