public String decryptString(String sCipherText)
    {
        // get the number of estimated bytes in the string (cut off broken blocks)
        int nLen = (sCipherText.length() >> 1) & ~7;

        // does the given stuff make sense (at least the CBC IV)?
        if (nLen < BlowfishECB.BLOCKSIZE)
            return null;

        // get the CBC IV
        byte[] cbciv = new byte[BlowfishCBC.BLOCKSIZE];
        int nNumOfBytes = binHexToBytes(sCipherText,
                cbciv,
                0,
                0,
                BlowfishCBC.BLOCKSIZE);
        if (nNumOfBytes < BlowfishCBC.BLOCKSIZE)
            return null;

        // something left to decrypt?
        nLen -= BlowfishCBC.BLOCKSIZE;
        if (nLen == 0)
        {
            return "";
        }

        // get all data bytes now
        byte[] buf = new byte[nLen];

        nNumOfBytes = binHexToBytes(sCipherText,
                buf,
                BlowfishCBC.BLOCKSIZE * 2,
                0,
                nLen);

        // we cannot accept broken binhex sequences due to padding
        // and decryption
        if (nNumOfBytes < nLen)
        {
            return null;
        }

        synchronized (m_bfish) {
            // (got it)
            m_bfish.setCBCIV(cbciv);

            // decrypt the buffer
            m_bfish.decrypt(buf);
        }

        // get the last padding byte
        int nPadByte = (int)buf[buf.length - 1] & 0x0ff;

        // ( try to get all information if the padding doesn't seem to be correct)
        if ((nPadByte > 8) || (nPadByte < 0))
        {
            nPadByte = 0;
        }

        // calculate the real size of this message
        nNumOfBytes -= nPadByte;
        if (nNumOfBytes < 0)
        {
            return "";
        }

        // success
        return byteArrayToUNCString(buf, 0, nNumOfBytes);
    }
decrypts a hexbin string (handling is case sensitive)
@param sCipherText hexbin string to decrypt
@return decrypted string (null equals an error)
xmppserver/src/main/java/org/jivesoftware/util/Blowfish.java