Since: API level 20
public class

KeyGenParameterSpec

extends Object
implements AlgorithmParameterSpec
java.lang.Object
   ↳ com.samsung.android.knox.ucm.plugin.keystore.KeyGenParameterSpec

Class Overview

Credential Storage provides APIs for Key and KeyPair Generation in Credential Storage. To support Key and KeyPair Generation, plugin should implement UcmAgentKeyPairGeneratorSpi that is extended from KeyPairGeneratorSpi or UcmAgentKeyGeneratorSpi that is extended from KeyGeneratorSpi.
In initialize API of KeyPairGeneratorSpi or KeyGeneratorSpi, Credential Storage can get key information.

 public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException {
   if ((params instanceof KeyGenParameterSpec) == false) {
     Log.e(TAG, "AlgorithmParameterSpec is not UCM KeyGenParameterSpec");
     throw new InvalidAlgorithmParameterException("AlgorithmParameterSpec is not UCM KeyGenParameterSpec");
   }
 
   KeyGenParameterSpec spec = (KeyGenParameterSpec) params;
   int keySize = spec.getKeySize();
   boolean isManaged = spec.isManaged();
   String alias = spec.getKeystoreAlias();
   int sourceUid = spec.getSourceUid();
   Bundle options = spec.getOptions();
   String algorithm = spec.getAlgorithm();
   int ownerUid = spec.getOwnerUid();
   int resourceId = spec.getResourceId();
 }
 

Since
API level 20
KNOX 2.7

Summary

Public Methods
String getAlgorithm()
String[] getBlockModes()
String[] getDigests()
String getEcCurveName()
int getKeySize()
String getKeystoreAlias()
Bundle getOptions()
int getOwnerUid()
int getPurposes()
int getResourceId()
String[] getSignaturePaddings()
int getSourceUid()
boolean isManaged()
boolean isRandomizedEncryptionRequired()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public String getAlgorithm ()

Since: API level 20

Since
API level 20
KNOX 2.7

public String[] getBlockModes ()

Since: API level 37

Since
API level 37
KNOX 3.10

public String[] getDigests ()

Since: API level 37

Since
API level 37
KNOX 3.10

public String getEcCurveName ()

Since: API level 37

Since
API level 37
KNOX 3.10

public int getKeySize ()

Since: API level 20

Since
API level 20
KNOX 2.7

public String getKeystoreAlias ()

Since: API level 20

Since
API level 20
KNOX 2.7

public Bundle getOptions ()

Since: API level 20

Since
API level 20
KNOX 2.7

public int getOwnerUid ()

Since: API level 20

Since
API level 20
KNOX 2.7

public int getPurposes ()

Since: API level 37

Since
API level 37
KNOX 3.10

public int getResourceId ()

Since: API level 20

Since
API level 20
KNOX 2.7

public String[] getSignaturePaddings ()

Since: API level 37

Since
API level 37
KNOX 3.10

public int getSourceUid ()

Since: API level 20

Since
API level 20
KNOX 2.7

public boolean isManaged ()

Since: API level 20

Since
API level 20
KNOX 2.7

public boolean isRandomizedEncryptionRequired ()

Since: API level 37

Since
API level 37
KNOX 3.10