Since: API level 19
public class

SdpEngine

extends Object
java.lang.Object
   ↳ com.samsung.android.knox.sdp.core.SdpEngine

Deprecated in API level 33

Class Overview

SdpEngine maintains cryptographic keys for sensitive data. The sensitive data can be decrypted only when the SdpEngine is unlocked.

Since
API level 19
KNOX 2.6

Summary

Public Methods
void addEngine(SdpCreationParam param, String password, String resetToken)
Deprecated in API level 33
boolean exists(String alias)
Deprecated in API level 33
static SdpEngine getInstance()
Deprecated in API level 33
void lock(String alias)
Deprecated in API level 33
void removeEngine(String alias)
Deprecated in API level 33
void resetPassword(String alias, String resetToken, String password)
Deprecated in API level 33
void setPassword(String alias, String password)
Deprecated in API level 33
void unlock(String alias, String password)
Deprecated in API level 33
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void addEngine (SdpCreationParam param, String password, String resetToken)

Since: API level 19

Deprecated in API level 33

API triggers SDP framework to install the cryptographic keys.

Usage:

        An application developer can use this API to add SdpEngine.


      try {

          sdpEngine.addEngine(

              TestUtils.getSdpCreationParam(), TestUtils.PASSWORD, TestUtils.RESET_TOKEN);

      } catch (SdpException e) {

          e.printStackTrace();

      }

 

Parameters
param SdpCreationParam object.
password User credential to unlock.
resetToken Reset token for resetPassword(String, String, String). resetToken can be null when SDP_MINOR is set. The user can reset its password without providing resetToken.
Throws
SdpException thrown when invalid parameter is given, invalid password is given, invalid reset token is given, SDP engine already exists, device doesn't support SDP or internal error has occurred.
Since
API level 19
KNOX 2.6
Multiuser Environment
User Scope

public boolean exists (String alias)

Since: API level 19

Deprecated in API level 33

API checks the existence of SdpEngine with the given alias.

Usage:

        An application developer can use this API to check existence of SdpEngine.


      if (sdpEngine.exists(TestUtils.ALIAS)) {

          Log.d(TAG, "Engine exists!");

      }

 

Parameters
alias SdpEngine alias.
Returns
  • true if the engine already exists, otherwise false.
Since
API level 19
KNOX 2.6
Multiuser Environment
User Scope

public static SdpEngine getInstance ()

Since: API level 28

Deprecated in API level 33

Static factory accessor for SdpEngine instance.

Usage:

        An application developer can use this API to get the instance of SdpEngine.


     SdpEngine sdpEngine;

     try {

         sdpEngine = SdpEngine.getInstance();

     } catch (SdpException e) {

         e.printStackTrace();

     }

 

Returns
  • SdpEngine object on success.
Throws
SdpException thrown when license activation is required.
Multiuser Environment
User Scope

public void lock (String alias)

Since: API level 19

Deprecated in API level 33

API locks the SdpEngine with the given alias.

Usage:

        An application developer can use this API to lock SdpEngine.


      try {

          sdpEngine.lock(

              TestUtils.ALIAS);

      } catch (SdpException e) {

          e.printStackTrace();

      }

 

Parameters
alias SdpEngine alias.
Throws
SdpException thrown when invalid parameter is given, SDP engine doesn't exist, no permission for this operation, device doesn't support SDP or internal error has occurred.
Since
API level 19
KNOX 2.6
Multiuser Environment
User Scope

public void removeEngine (String alias)

Since: API level 19

Deprecated in API level 33

API removes SdpEngine with the given alias.

Usage:

        An application developer can use this API to remove SdpEngine.


      try {

          sdpEngine.removeEngine(TestUtils.ALIAS);

      } catch (SdpException e) {

          e.printStackTrace();

      }

 

Parameters
alias SdpEngine alias.
Throws
SdpException thrown when SDP engine doesn't exist, no permission for the operation, device doesn't support SDP or internal error has occurred.
Since
API level 19
KNOX 2.6
Multiuser Environment
User Scope

public void resetPassword (String alias, String resetToken, String password)

Since: API level 19

Deprecated in API level 33

API resets user credential to the given password. resetToken is used to authenticate whether the caller is a owner of the SdpEngine or not. If the SdpEngine is created with SDP_MINOR, resetToken parameter is not required.

Usage:

        An application developer can use this API to reset credential.


      try {

          sdpEngine.resetPassword(

              TestUtils.ALIAS, TestUtils.RESET_TOKEN, TestUtils.PASSWORD);

      } catch (SdpException e) {

          e.printStackTrace();

      }

 

Parameters
alias SdpEngine alias.
resetToken Reset token. resetToken can be null when SDP_MINOR is set.
password New user credential.
Throws
SdpException thrown when invalid reset token is given, SDP engine doesn't exist, no permission for the operation, invalid password is given, device doesn't support SDP or internal error has occurred.
Since
API level 19
KNOX 2.6
Multiuser Environment
User Scope

public void setPassword (String alias, String password)

Since: API level 19

Deprecated in API level 33

API updates user credential with the given password. This operation will be allowed only when the SdpEngine is unlocked.

Usage:

        An application developer can use this API to set new credential.


      try {

          sdpEngine.setPassword(

              TestUtils.ALIAS, TestUtils.TEMP_PASSWORD);

      } catch (SdpException e) {

          e.printStackTrace();

      }

 

Parameters
alias SdpEngine alias.
password New user credential.
Throws
SdpException thrown when SDP engine doesn't exist, no permission for the operation, SDP engine is in locked state, invalid password is given, device doesn't support SDP or internal error has occurred.
Since
API level 19
KNOX 2.6
Multiuser Environment
User Scope

public void unlock (String alias, String password)

Since: API level 19

Deprecated in API level 33

API unlocks the SdpEngine with the given parameters.

Usage:

        An application developer can use this API to unlock SdpEngine.


      try {

          sdpEngine.unlock(

              TestUtils.ALIAS, TestUtils.PASSWORD);

      } catch (SdpException e) {

          e.printStackTrace();

      }

 

Parameters
alias SdpEngine alias.
password User credential to unlock.
Throws
SdpException thrown when invalid password is given, SDP engine is throttled, SDP engine doesn't exist, no permission for the operation, device doesn't support SDP or internal error occurred.
Since
API level 19
KNOX 2.6
Multiuser Environment
User Scope