public static String createDigest(final String sessionID, final JID initiator,
                                      final JID target) {
        return StringUtils.hash(sessionID + initiator.getNode()
                + "@" + initiator.getDomain() + "/"
                + initiator.getResource()
                + target.getNode() + "@"
                + target.getDomain() + "/"
                + target.getResource(), "SHA-1");
    }
Creates the digest needed for a byte stream. It is the SHA1(sessionID +
initiator + target).

@param sessionID The sessionID of the stream negotiation
@param initiator The initiator of the stream negotiation
@param target The target of the stream negotiation
@return SHA-1 hash of the three parameters
xmppserver/src/main/java/org/jivesoftware/openfire/filetransfer/proxy/ProxyConnectionManager.java