@Override
    public void setKey(String key) {
        
        String password = key == null ? DEFAULT_KEY : key;
        // hash down the password to a 160bit key
        MessageDigest digest = null;
        try {
            digest = MessageDigest.getInstance("SHA1");
            digest.update(password.getBytes());
        }
        catch (Exception e) {
            Log.error(e.getMessage(), e);
        }

        // setup the encryptor (use a dummy IV)
        m_bfish = new BlowfishCBC(digest.digest(), 0);
        digest.reset();
    }
converts a byte array into an UNICODE string
@param data the byte array
@param nStartPos where to begin the conversion
@param nNumOfBytes number of bytes to handle
@return the string
xmppserver/src/main/java/org/jivesoftware/util/Blowfish.java