src/main/java/org/jivesoftware/smack/packet/Authentication.java
public void setDigest(String connectionID, String password) {
        setDigest(StringUtils.hash(connectionID + password));
    }
public void setDigest(String connectionID, String password) {
        setDigest(StringUtils.hash(connectionID + password));
    }
Sets the digest value using a connection ID and password. Password
digests offer a more secure alternative for authentication compared to
plain text. The digest is the hex-encoded SHA-1 hash of the connection ID
plus the user's password. If the digest and password are set, digest
authentication will be used. If only one value is set, the respective
authentication mode will be used.

@param connectionID
the connection ID.
@param password
the password.
@see org.jivesoftware.smack.Connection#getConnectionID()