# Deprecated

## Notice Config

### getDisabledPurposes

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getDisabledPurposeIds

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getDisabledVendors

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getDisabledVendorIds

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getEnabledPurposes

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getEnabledPurposeIds

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getEnabledVendors

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getEnabledVendorIds

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getRequiredPurposeIds

**Removed since version 2.0.0**, use [getRequiredPurposes](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getrequiredpurposes) instead.

Get the list of purpose IDs that are required (automatically determined from the list of required vendors).

**Requires SDK to be initialized**

Yes.

**Parameters**

No parameter.

**Throws**

| **Type**                | Description                                                                                                                                                                                                       |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DidomiNotReadyException | Exception thrown when a method that requires the Didomi SDK to be ready is called before that. Developers can call this method within a try/catch or within a lambda expression passed into the `onReady` method. |

**Returns**

| Type          | Description                                                     |
| ------------- | --------------------------------------------------------------- |
| `Set<String>` | A set of type `String` containing the IDs of required purposes. |

**Example**

{% tabs %}
{% tab title="Java" %}

```java
Didomi.getInstance().getRequiredPurposeIds();
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
Didomi.getInstance().requiredPurposeIds
```

{% endtab %}
{% endtabs %}

### getRequiredVendorIds

**Removed since version 2.0.0**, use [getRequiredVendors](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getrequiredvendors) instead.

Get the list of vendor IDs that are required (determined from the configuration).

**Requires SDK to be initialized**

Yes.

**Parameters**

No parameter.

**Throws**

| **Type**                | Description                                                                                                                                                                                                       |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DidomiNotReadyException | Exception thrown when a method that requires the Didomi SDK to be ready is called before that. Developers can call this method within a try/catch or within a lambda expression passed into the `onReady` method. |

**Returns**

| Type          | Description                                                    |
| ------------- | -------------------------------------------------------------- |
| `Set<String>` | A set of type `String` containing the IDs of required vendors. |

**Example**

{% tabs %}
{% tab title="Java" %}

```java
Didomi.getInstance().getRequiredVendorIds();
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
Didomi.getInstance().requiredVendorIds
```

{% endtab %}
{% endtabs %}

***

## User Status

### getUserConsentStatusForPurpose

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getUserConsentStatusForVendor

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getUserConsentStatusForVendorAndRequiredPurposes

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getUserLegitimateInterestStatusForPurpose

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getUserLegitimateInterestForVendor

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getUserLegitimateInterestStatusForVendorAndRequiredPurposes

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### getUserStatus

**Deprecated**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

Get all the user consent status.

**Throws**

<table data-header-hidden><thead><tr><th width="334">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Type</strong></td><td>Description</td></tr><tr><td>DidomiNotReadyException</td><td>Exception thrown when a method that requires the Didomi SDK to be ready is called before that. Developers can call this method within a try/catch or within a lambda expression passed into the <code>onReady</code> method.</td></tr></tbody></table>

**Returns**

A `UserStatus` object describing all the available and computed user information.

<table data-header-hidden><thead><tr><th width="249.33333333333331">Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Parameter</td><td>Type</td><td>Description</td></tr><tr><td>purposes.global.disabled</td><td>Set&#x3C;String></td><td>Computed sets/lists of disabled IDs of purposes that have been chosen by the user regarding the consent or legitimate interest Legal Basis.</td></tr><tr><td>purposes.global.enabled</td><td>Set&#x3C;String></td><td>Computed sets/lists of enabled IDs of purposes that have been chosen by the user regarding the consent or legitimate interest Legal Basis. Purposes considered as essential will be part of the enabled IDs.</td></tr><tr><td>purposes.consent.disabled</td><td>Set&#x3C;String></td><td>Disabled IDs of purposes that have been explicitly chosen by the user regarding the consent Legal Basis.</td></tr><tr><td>purposes.consent.enabled</td><td>Set&#x3C;String></td><td>Enabled IDs of purposes that have been explicitly chosen by the user regarding the consent Legal Basis.</td></tr><tr><td>purposes.legitimateInterest.disabled</td><td>Set&#x3C;String></td><td>Disabled IDs of purposes that have been explicitly chosen by the user regarding the legitimate interest Legal Basis.</td></tr><tr><td>purposes.legitimateInterest.enabled</td><td>Set&#x3C;String></td><td>Enabled IDs of purposes that have been explicitly chosen by the user regarding the legitimate interest Legal Basis.</td></tr><tr><td>purposes.essential</td><td>Set&#x3C;String></td><td>IDs of purposes that are considered essential.</td></tr><tr><td>vendors.global.disabled</td><td>Set&#x3C;String></td><td>Computed sets/lists of disabled IDs of vendors that have been chosen by the user regarding the consent or legitimate interest Legal Basis. This takes into account the consent and legitimate interest required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.</td></tr><tr><td>vendors.global.enabled</td><td>Set&#x3C;String></td><td>Computed sets/lists of enabled IDs of vendors that have been chosen by the user regarding the consent or legitimate interest Legal Basis. This takes into account the consent and legitimate interest required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.</td></tr><tr><td>vendors.globalConsent.disabled</td><td>Set&#x3C;String></td><td>Computed sets/lists of disabled IDs of vendors that have been chosen by the user regarding the consent Legal Basis. This takes into account the consent required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.</td></tr><tr><td>vendors.globalConsent.enabled</td><td>Set&#x3C;String></td><td>Computed sets/lists of enabled IDs of vendors that have been chosen by the user regarding the consent Legal Basis. This takes into account the consent required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.</td></tr><tr><td>vendors.globalLegitimateInterest.disabled</td><td>Set&#x3C;String></td><td>Computed sets/lists of disabled IDs of vendors that have been chosen by the user regarding the legitimate interest Legal Basis. This takes into account the legitimate interest required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.</td></tr><tr><td>vendors.globalLegitimateInterest.enabled</td><td>Set&#x3C;String></td><td>Computed sets/lists of enabled IDs of vendors that have been chosen by the user regarding the legitimate interest Legal Basis. This takes into account the legitimate interest required purposes linked to vendors. When computing this property, essential purposes will be considered as enabled.</td></tr><tr><td>vendors.consent.disabled</td><td>Set&#x3C;String></td><td>Disabled IDs of vendors that have been explicitly chosen by the user regarding the consent Legal Basis.</td></tr><tr><td>vendors.consent.enabled</td><td>Set&#x3C;String></td><td>Enabled IDs of vendors that have been explicitly chosen by the user regarding the consent Legal Basis.</td></tr><tr><td>vendors.legitimateInterest.disabled</td><td>Set&#x3C;String></td><td>Disabled IDs of vendors that have been explicitly chosen by the user regarding the legitimate interest Legal Basis.</td></tr><tr><td>vendors.legitimateInterest.enabled</td><td>Set&#x3C;String></td><td>Enabled IDs of vendors that have been explicitly chosen by the user regarding the legitimate interest Legal Basis.</td></tr><tr><td>userId</td><td>String</td><td>Didomi user id.</td></tr><tr><td>created</td><td>String</td><td>User choices creation date.</td></tr><tr><td>updated</td><td>String</td><td>User choices update date.</td></tr><tr><td>consentString</td><td>String</td><td>TFC consent as string.</td></tr><tr><td>additionalConsent</td><td>String</td><td>Additional consent for <a href="../../../../third-party-sdks#google-additional-consent-mode">Google Additional Consent Mode</a>.</td></tr><tr><td>regulation</td><td><code>Regulation</code></td><td>Representation of the current regulation as a <code>Regulation</code> enum value, such as <code>GDPR</code>, <code>CCPA</code>, <code>CPRA</code>, or <code>NONE</code>. Note that some regulations present as enum values are not available yet.</td></tr></tbody></table>

**Example**

{% tabs %}
{% tab title="Java" %}

```java
UserStatus userStatus = Didomi.getInstance().getUserStatus();

// Enabled consent ids for vendors
Set<String> enabledVendorsConsentIds = userStatus.getVendors().getConsent().getEnabled();
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
val userStatus = Didomi.getInstance().userStatus

// Enabled consent ids for vendors
val enabledVendorsConsentIds = userStatus.vendors.consent.enabled
```

{% endtab %}
{% endtabs %}

### getUserStatusForVendor

**Removed since version 2.0.0**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#getcurrentuserstatus) instead.

### isConsentRequired

**Deprecated**, use [getCurrentUserStatus](https://developers.didomi.io/cmp/ios/reference/api#getcurrentuserstatus) and check that the field `regulation`is not `Regulation.NONE`.

Determine if consent is required for the user. This takes into account the location of the user and the configuration of the SDK:

* If your app is configured to apply GDPR to all users then this function always returns `true`.
* If your app is configured to apply GDPR to EU users only then this function returns `true` only if the user in the EU.

**Parameters**

No parameter.

**Throws**

| **Type**                | Description                                                                                                                                                                                                       |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DidomiNotReadyException | Exception thrown when a method that requires the Didomi SDK to be ready is called before that. Developers can call this method within a try/catch or within a lambda expression passed into the `onReady` method. |

**Returns**

`boolean`

**Example**

{% tabs %}
{% tab title="Java" %}

```javascript
Didomi.getInstance().isConsentRequired();
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
Didomi.getInstance().isConsentRequired
```

{% endtab %}
{% endtabs %}

### isUserConsentStatusPartial

**Deprecated**, use [isUserStatusPartial](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#isuserstatuspartial) instead.

Determine if all consent information is available for the user.

This function returns `true` if and only if:

* Consent is required for the user (ie the user is in the EU or your tag is configured to apply GDPR to all users)
* At least one vendor is configured (if there is no vendor configured, this function always returns `false` as there is no consent to collect)
* We miss consent information for some vendors or purposes

If there is at least one piece of consent information missing for a single vendor/purpose, this function will return `true`. The consent notice is usually displayed when this function returns `true` although there is no guarantee of the direct mapping between the two.

An important edge case is when you add new vendors or if configured vendors ask for new purposes: the consent notice will be displayed again and this function will return `true` until the user has given or denied consent. Vendors that already had consent before will still operate normally as we only recollect consent for additional vendors/purposes.

**Parameters**

No parameter.

**Throws**

| **Type**                | Description                                                                                                                                                                                                       |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DidomiNotReadyException | Exception thrown when a method that requires the Didomi SDK to be ready is called before that. Developers can call this method within a try/catch or within a lambda expression passed into the `onReady` method. |

**Returns**

`boolean`

**Example**

{% tabs %}
{% tab title="Java" %}

```javascript
Didomi.getInstance().isUserConsentStatusPartial();
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
Didomi.getInstance().isUserConsentStatusPartial
```

{% endtab %}
{% endtabs %}

### isUserLegitimateInterestStatusPartial

**Deprecated**, use [isUserStatusPartial](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#isuserstatuspartial) instead.

Determine if all Legitimate Interest information is available for the user.

This function returns `true` if and only if:

* Legitimate Interest is required for the user (ie the user is in the EU or your tag is configured to apply GDPR to all users)
* At least one vendor is configured (if there is no vendor configured, this function always returns `false` as there is no Legitimate Interest to collect)
* We miss Legitimate Interest information for some vendors or purposes

If there is at least one piece of Legitimate Interest information missing for a single vendor/purpose, this function will return `true`. The consent notice is usually displayed when this function returns `true` although there is no guarantee of the direct mapping between the two.

An important edge case is when you add new vendors or if configured vendors ask for new purposes: the consent notice will be displayed again and this function will return `true` until the user has given or denied consent. Vendors that already had Legitimate Interest before will still operate normally as we only recollect Legitimate Interest for additional vendors/purposes.

**Parameters**

No parameter.

**Throws**

| **Type**                | Description                                                                                                                                                                                                       |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DidomiNotReadyException | Exception thrown when a method that requires the Didomi SDK to be ready is called before that. Developers can call this method within a try/catch or within a lambda expression passed into the `onReady` method. |

**Returns**

`boolean`

**Example**

{% tabs %}
{% tab title="Java" %}

```java
Didomi.getInstance().isUserLegitimateInterestStatusPartial();
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
Didomi.getInstance().isUserLegitimateInterestStatusPartial
```

{% endtab %}
{% endtabs %}

### setUserConsentStatus

**Deprecated**, use [setCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#setcurrentuserstatus) instead.

### setUserStatus

**Removed since version 2.0.0**, use [setCurrentUserStatus](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#setcurrentuserstatus) instead.

Set the user status for purposes and vendors. This function will trigger events and API calls every time it is called (and the user status changes) so make sure to push all user choices at once and not one by one.

Please read [our article](https://support.didomi.io/analytics-with-a-custom-setup) on what to expect from your analytics when setting a custom behavior for your consent notice.

**Parameters**

**Global method:**

Define a global status for consent purposes, legitimate interest purposes, consent vendors, legitimate interest vendors

| Name                  | Type      | Description                                                                                             |
| --------------------- | --------- | ------------------------------------------------------------------------------------------------------- |
| purposesConsentStatus | `boolean` | `true` if purposes on a consent basis should be enabled, `false` if they should be disabled             |
| purposesLIStatus      | `boolean` | `true` if purposes on a legitimate interest basis should be enabled, `false` if they should be disabled |
| vendorsConsentStatus  | `boolean` | `true` if vendors on a consent basis should be enabled, `false` if they should be disabled              |
| vendorsLIStatus       | `boolean` | `true` if vendors on a legitimate interest basis should be enabled, `false` if they should be disabled  |

**Example**

{% tabs %}
{% tab title="Java" %}

```javascript
// Disable everything except vendors legitimate interest
Didomi.getInstance().setUserStatus(
    false, true, false, true
);
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
// Disable everything except vendors legitimate interest
Didomi.getInstance().setUserStatus(
    purposesConsentStatus = false,
    purposesLIStatus = true,
    vendorsConsentStatus = false,
    vendorsLIStatus = true
)
```

{% endtab %}
{% endtabs %}

**Individual purposes/vendors method:**

Allows to define precisely which purposes and vendors are enabled / disabled

| Name                      | Type          | Description                                                                                                                                |
| ------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| enabledConsentPurposeIds  | `Set<String>` | Set of purpose IDs that the user has given consent to                                                                                      |
| disabledConsentPurposeIds | `Set<String>` | Set of purpose IDs that the user has not given consent to                                                                                  |
| enabledLIPurposeIds       | `Set<String>` | Set of purpose IDs that the user has allowed legitimate interest processing to                                                             |
| disabledLIPurposeIds      | `Set<String>` | Set of purpose IDs that the user has disallowed legitimate interest processing to                                                          |
| enabledConsentVendorIds   | `Set<String>` | <p>Set of vendor IDs that the user has given consent to.</p><p>Prefix custom vendor IDs with <code>c:</code>.</p>                          |
| disabledConsentVendorIds  | `Set<String>` | Set of vendor IDs that the user has not given consent to                                                                                   |
| enabledLIVendorIds        | `Set<String>` | <p>Set of vendor IDs that the user has allowed legitimate interest processing to.</p><p>Prefix custom vendor IDs with <code>c:</code>.</p> |
| disabledLIVendorIds       | `Set<String>` | Set of vendor IDs that the user has not allowed legitimate interest processing to                                                          |

**Throws**

| **Type**                | Description                                                                                                                                                                                                       |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DidomiNotReadyException | Exception thrown when a method that requires the Didomi SDK to be ready is called before that. Developers can call this method within a try/catch or within a lambda expression passed into the `onReady` method. |

**Returns**

`boolean`

`true` if the user choices have changed (i.e. the user had made different choices before this function got called).

**Example**

{% tabs %}
{% tab title="Java" %}

<pre class="language-javascript"><code class="lang-javascript">Didomi.getInstance().setUserStatus(
    new HashSet&#x3C;String>(Arrays.asList("cookies", "ad_delivery")),
    new HashSet&#x3C;String>(Arrays.asList("market_research")),
    new HashSet&#x3C;String>(Arrays.asList("cookies", "market_research"),
<strong>    new HashSet&#x3C;String>(Arrays.asList("ad_delivery"),
</strong><strong>    new HashSet&#x3C;String>(Arrays.asList("123", "c:custom-vendor-id")),
</strong>    new HashSet&#x3C;String>(Arrays.asList("125")),
    new HashSet&#x3C;String>(Arrays.asList("123", "125", "c:custom-vendor-id")),
    new HashSet&#x3C;String>()
);
</code></pre>

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
Didomi.getInstance().setUserStatus(
    enabledConsentPurposeIds = setOf("cookies", "ad_delivery"),
    disabledConsentPurposeIds = setOf("market_research"),
    enabledLIPurposeIds = setOf("cookies", "market_research"),
    disabledLIPurposeIds = setOf("ad_delivery"),
    enabledConsentVendorIds = setOf("123", "c:custom-vendor-id"),
    disabledConsentVendorIds = setOf("125"),
    enabledLIVendorIds = setOf("123", "125", "c:custom-vendor-id"),
    disabledConsentVendorIds = emptySet()
);
```

{% endtab %}
{% endtabs %}

### shouldConsentBeCollected

**Deprecated**, use [shouldUserStatusBeCollected](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#shoulduserstatusbecollected) instead.

Determine if consent should be collected for the visitor. Returns `true` if consent is required for the current user and one of following two conditions is met:

* Consent has never been collected for this visitor yet
* New consents should be collected (as new vendors have been added) AND the number of days before recollecting them has exceeded

If none of these two conditions is met, the function returns `false`. This function is mainly present to allow you to know when to display your own notice if you have disabled our standard notice.

**Parameters**

No parameter.

**Throws**

| **Type**                | Description                                                                                                                                                                                                       |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DidomiNotReadyException | Exception thrown when a method that requires the Didomi SDK to be ready is called before that. Developers can call this method within a try/catch or within a lambda expression passed into the `onReady` method. |

**Returns**

`boolean`

**Example**

{% tabs %}
{% tab title="Java" %}

```java
Didomi.getInstance().shouldConsentBeCollected();
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
Didomi.getInstance().shouldConsentBeCollected()
```

{% endtab %}
{% endtabs %}

### setUser

**Deprecated**, use [setUser](https://developers.didomi.io/cmp/mobile-sdk/android/reference/api/..#setuser) with `DidomiUserParameters` instead.

Set user information from organization for cross device functionality. For detailed information, see [documentation](https://developers.didomi.io/cmp/mobile-sdk/share-consents-across-devices).

**Parameters**

***Method without authentication:***

| Name               | Type               | Description                                                                                 |
| ------------------ | ------------------ | ------------------------------------------------------------------------------------------- |
| organizationUserId | `String`           | Organization ID to associate with the user                                                  |
| activity           | `FragmentActivity` | Optional. When present, notice will be displayed if synchronized user has partial consents. |

***Method with Encrypted authentication:***

| Name           | Type                           | Description                                                                                 |
| -------------- | ------------------------------ | ------------------------------------------------------------------------------------------- |
| userAuthParams | `UserAuthWithEncryptionParams` | User authentication with encryption                                                         |
| activity       | `FragmentActivity`             | Optional. When present, notice will be displayed if synchronized user has partial consents. |

Parameters for `UserAuthWithEncryptionParams` :

| Name                 | Type     | Description                                                |
| -------------------- | -------- | ---------------------------------------------------------- |
| id                   | `String` | Organization ID to associate with the user                 |
| algorithm            | `String` | Algorithm used for computing the user ID                   |
| secretId             | `String` | ID of the secret used for the computing the user ID        |
| initializationVector | `String` | Initialization Vector used for encrypting the message      |
| expiration           | `Long`   | Expiration time as UNIX timestamp (optional - must be > 0) |

***Method with Hash authentication:***

| Name           | Type                     | Description                         |
| -------------- | ------------------------ | ----------------------------------- |
| userAuthParams | `UserAuthWithHashParams` | User authentication with encryption |

Parameters for `UserAuthWithHashParams` :

| Name       | Type     | Description                                                |
| ---------- | -------- | ---------------------------------------------------------- |
| id         | `String` | Organization ID to associate with the user                 |
| algorithm  | `String` | Algorithm used for computing the user ID                   |
| secretId   | `String` | ID of the secret used for the computing the user ID        |
| digest     | `String` | Digest used for representing the user ID                   |
| salt       | `String` | Salt used for computing the user ID (optional)             |
| expiration | `Long`   | Expiration time as UNIX timestamp (optional - must be > 0) |

**Returns**

Nothing

**Example**

{% tabs %}
{% tab title="Java" %}

```javascript
Didomi.getInstance().setUser("e3222031-7c45-4f4a-8851-ffd57dbf0a2a");

Didomi.getInstance().setUser(new UserAuthWithEncryptionParams(
            "e3222031-7c45-4f4a-8851-ffd57dbf0a2a",
            "algorithm",
            "secret_id",
            "initialization_vector",
            10000L // or null
));

Didomi.getInstance().setUser(new UserAuthWithHashParams(
            "e3222031-7c45-4f4a-8851-ffd57dbf0a2a",
            "algorithm",
            "secret_id",
            "digest",
            "salt", // or null
            10000L // or null
));
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
Didomi.getInstance().setUser("e3222031-7c45-4f4a-8851-ffd57dbf0a2a")

Didomi.getInstance().setUser(
    UserAuthWithEncryptionParams(
        id = "e3222031-7c45-4f4a-8851-ffd57dbf0a2a",
        algorithm = "algorithm",
        secretId = "secret_id",
        initializationVector = "initialization_vector",
        expiration = 10000L // or null
    )
)

Didomi.getInstance().setUser(
    UserAuthWithHashParams(
        id = "e3222031-7c45-4f4a-8851-ffd57dbf0a2a",
        algorithm = "algorithm",
        secretId = "secret_id",
        digest = "digest",
        salt = "salt", // or null
        expiration = 10000L // or null
    )
)
```

{% endtab %}
{% endtabs %}
