You can use isMatch(java.lang.String secret, java.lang.String encryptedOrHashedValue, SailPointContext context) method from class sailpoint.api.EncodingUtil to match whether the passed in secret matches the hashed or encrypted value based on the encryption or hashing algorithm.
sailpoint.api.EncodingUtil.isMatch(java.lang.String secret, java.lang.String encryptedOrHashedValue, SailPointContext context)