public class

UcmAgentProviderImpl

extends Provider
java.lang.Object
   ↳ java.util.Dictionary<K, V>
     ↳ java.util.Hashtable<K, V>
       ↳ java.util.Properties
         ↳ java.security.Provider
           ↳ com.samsung.android.knox.ucm.plugin.agent.UcmAgentProviderImpl

Class Overview

This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security.

Since
API level 20
KNOX 2.7

Summary

Nested Classes
class UcmAgentProviderImpl.UcmAgentCipherSpi This class provide API's extended from CipherSpi. 
class UcmAgentProviderImpl.UcmAgentKeyPairGeneratorSpi This class provide API's extended from KeyPairGeneratorSpi. 
class UcmAgentProviderImpl.UcmAgentKeyStoreSpi This class provide API's extended from KeyStoreSpi. 
class UcmAgentProviderImpl.UcmAgentSecureRandomSpi This class provide API's extended from SecureRandomSpi. 
interface UcmAgentProviderImpl.UcmAgentSpiProperty This interface provide API's and constants which is implemented by UCM SPI classes. 
Constants
String CIPHER Cipher type
String CIPHER_RSA_ECB_PKCS1PADDING Cipher Algorithm
String KEYPAIRGENERATOR KeyPairGenerator type
String KEYPAIRGENERATOR_RSA KeyPairGenerator Algorithm
String KEYSTORE KeyStore type
String KEYSTORE_TYPE KeyStore
String SECURERANDOM SecureRandom type
String SECURERANDOM_SHA1PRNG SecureRandom Algorithm
[Expand]
Inherited Fields
From class java.util.Properties
Public Constructors
UcmAgentProviderImpl()
Constructs a new instance of Provider with its name, version and description.
Public Methods
void putServiceImpl(Provider.Service service)
API to register UCM Service Provider class with Security Provider.
void removeServiceImpl(Provider.Service service)
API to remove UCM SPI service class from provider.
[Expand]
Inherited Methods
From class java.security.Provider
From class java.util.Properties
From class java.util.Hashtable
From class java.util.Dictionary
From class java.lang.Object
From interface java.util.Map

Constants

public static final String CIPHER

Since: API level 20

Cipher type

Since
API level 20
KNOX 2.7
Constant Value: "Cipher"

public static final String CIPHER_RSA_ECB_PKCS1PADDING

Since: API level 20

Cipher Algorithm

Since
API level 20
KNOX 2.7
Constant Value: "RSA/ECB/PKCS1Padding"

public static final String KEYPAIRGENERATOR

Since: API level 20

KeyPairGenerator type

Since
API level 20
KNOX 2.7
Constant Value: "KeyPairGenerator"

public static final String KEYPAIRGENERATOR_RSA

Since: API level 20

KeyPairGenerator Algorithm

Since
API level 20
KNOX 2.7
Constant Value: "RSA"

public static final String KEYSTORE

Since: API level 20

KeyStore type

Since
API level 20
KNOX 2.7
Constant Value: "KeyStore"

public static final String KEYSTORE_TYPE

Since: API level 20

KeyStore

Since
API level 20
KNOX 2.7
Constant Value: "KNOX"

public static final String SECURERANDOM

Since: API level 20

SecureRandom type

Since
API level 20
KNOX 2.7
Constant Value: "SecureRandom"

public static final String SECURERANDOM_SHA1PRNG

Since: API level 20

SecureRandom Algorithm

Since
API level 20
KNOX 2.7
Constant Value: "SHA1PRNG"

Public Constructors

public UcmAgentProviderImpl ()

Since: API level 20

Constructs a new instance of Provider with its name, version and description.

Since
API level 20
KNOX 2.7

Public Methods

public void putServiceImpl (Provider.Service service)

Since: API level 20

API to register UCM Service Provider class with Security Provider.

Parameters
service Provider Service
Usage

To support JCE operation, plugin application should register Provider Service and SPI, and the SPI should be extended by UcmAgentCipherSpi, UcmAgentKeyPairGeneratorSpi, UcmAgentKeyStoreSpi or UcmAgentSecureRandomSpi. Plugin application can use this API to add UCM extended SPI and Provider Service to UCM framework.

 public class VendorPluginService extends UcmAgentService {
   private void initializeProvider() {
     UcmAgentProviderImpl providerImpl = (UcmAgentProviderImpl) getProvider();
 
     // KeyStore
     VendorKeyStoreProviderService serviceKeyStoreProvider = new VendorKeyStoreProviderService(providerImpl, UcmAgentProviderImpl.KEYSTORE, UcmAgentProviderImpl.KEYSTORE_TYPE, VendorKeyStoreSpi.class.getName(), getApplicationContext());
     providerImpl.putServiceImpl(serviceKeyStoreProvider);
 
     // Cipher
     VendorCipherProviderService serviceCipherProvider = new VendorCipherProviderService(providerImpl, UcmAgentProviderImpl.CIPHER, CIPHER_RSA_ECB_PKCS1PADDING, VendorCipherSpi.class.getName(), getApplicationContext());
     providerImpl.putServiceImpl(serviceCipherProvider);
 
     // KeyPairGenerator
     VendorKeyPairGeneratorService serviceKeyPairProvider = new VendorKeyPairGeneratorService(providerImpl, UcmAgentProviderImpl.KEYPAIRGENERATOR, "RSA", VendorKeyPairGeneratorSpi.class.getName(), getApplicationContext());
     providerImpl.putServiceImpl(serviceKeyPairProvider);
 
     // SecureRandom
     VendorSecureRandomService serviceSecureRandomProvider = new VendorSecureRandomService(providerImpl, UcmAgentProviderImpl.SECURERANDOM, "SHA1PRNG", VendorSecureRandomSpi.class.getName(), getApplicationContext());
     providerImpl.putServiceImpl(serviceSecureRandomProvider);
   }
 }
 

Note: All SPI and Provider Service class are implemented by plugin vendor.

Since
API level 20
KNOX 2.7
Multiuser Environment
Global Scope

public void removeServiceImpl (Provider.Service service)

Since: API level 20

API to remove UCM SPI service class from provider.

Parameters
service Provider Service
Usage

API to remove UCM SPI service class from provider. To perform a particular operation, plugin application can use this API to remove Provider Service.

 public class VendorPluginService extends UcmAgentService {
   private void initializeProvider() {
     UcmAgentProviderImpl providerImpl = (UcmAgentProviderImpl) getProvider();
 
     // KeyStore
     Provider.Service serviceKeyStoreProvider = providerImpl.getService(UcmAgentProviderImpl.KEYSTORE, UcmAgentProviderImpl.KEYSTORE_TYPE);
     providerImpl.removeServiceImpl(serviceKeyStoreProvider);
 
     // Cipher
     Provider.Service serviceCipherProvider = providerImpl.getService(UcmAgentProviderImpl.CIPHER, CIPHER_RSA_ECB_PKCS1PADDING);
     providerImpl.removeServiceImpl(serviceCipherProvider);
 
     // KeyPairGenerator
     Provider.Service serviceKeyPairProvider = providerImpl.getService(UcmAgentProviderImpl.KEYPAIRGENERATOR, "RSA");
     providerImpl.removeServiceImpl(serviceKeyPairProvider);
 
     // SecureRandom
     Provider.Service serviceSecureRandomProvider = providerImpl.getService(UcmAgentProviderImpl.SECURERANDOM, "SHA1PRNG");
     providerImpl.removeServiceImpl(serviceSecureRandomProvider);
   }
 }
 
Since
API level 20
KNOX 2.7
Multiuser Environment
Global Scope