Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.util
Class Blowfish

    java.lang.Object
      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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.