Openfire 3.4.3 Javadoc

org.jivesoftware.util
Class Blowfish

java.lang.Object
  extended by org.jivesoftware.util.Blowfish

public class Blowfish
extends Object

A class that provides easy Blowfish encryption.

Author:
Markus Hahn , Gaston Dombiak

Constructor Summary
Blowfish(String password)
          Creates a new Blowfish object using the specified key (oversized password will be cut).
 
Method Summary
 String decryptString(String sCipherText)
          decrypts a hexbin string (handling is case sensitive)
 void destroy()
          destroys (clears) the encryption engine, after that the instance is not valid anymore
 String encryptString(String sPlainText)
          Encrypts a string (treated in UNICODE) using the standard Java random generator, which isn't that great for creating IVs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Blowfish

public Blowfish(String password)
Creates a new Blowfish object using the specified key (oversized password will be cut).

Parameters:
password - the password (treated as a real unicode array)
Method Detail

encryptString

public String encryptString(String sPlainText)
Encrypts a string (treated in UNICODE) using the standard Java random generator, which isn't that great for creating IVs

Parameters:
sPlainText - string to encrypt
Returns:
encrypted string in binhex format

decryptString

public String decryptString(String sCipherText)
decrypts a hexbin string (handling is case sensitive)

Parameters:
sCipherText - hexbin string to decrypt
Returns:
decrypted string (null equals an error)

destroy

public void destroy()
destroys (clears) the encryption engine, after that the instance is not valid anymore


Openfire 3.4.3 Javadoc

Copyright © 2003-2007 Jive Software.