Buju 0.4

biz.bbeans.util
Class BDigest

java.lang.Object
  extended bybiz.bbeans.util.BDigest

public final class BDigest
extends Object

Digest which produces a human-readable hash. Singleton.


Method Summary
 String encrypt(String plaintext)
          Encrypt the plain text.
static BDigest getInstance()
          Get or create the singleton instance of BDigest.
static void main(String[] args)
          Usage: BDigest password1 [password2 password3 ...]
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encrypt

public String encrypt(String plaintext)
               throws NoSuchAlgorithmException,
                      UnsupportedEncodingException
Encrypt the plain text.

Parameters:
plaintext - Plain text message or password.
Returns:
Encrypted digest.
Throws:
NoSuchAlgorithmException - If the encryption algorithm is not supported.
UnsupportedEncodingException - If UTF-8 character set encoding is not supported.

getInstance

public static BDigest getInstance()
Get or create the singleton instance of BDigest.

Returns:
Instance of BDigest.

main

public static void main(String[] args)
Usage: BDigest password1 [password2 password3 ...]


Buju 0.4