Searched refs:keyType (Results 1 - 17 of 17) sorted by relevance

/frameworks/base/keystore/java/android/security/
H A DKeyPairGeneratorSpec.java117 * @param keyType key algorithm to use (RSA, DSA, EC)
129 public KeyPairGeneratorSpec(Context context, String keyStoreAlias, String keyType, int keySize, argument
148 final int keyTypeInt = KeyStore.getKeyTypeForAlgorithm(keyType);
157 mKeyType = keyType;
167 private static int getDefaultKeySizeForType(int keyType) { argument
168 if (keyType == NativeCrypto.EVP_PKEY_DSA) {
170 } else if (keyType == NativeCrypto.EVP_PKEY_EC) {
172 } else if (keyType == NativeCrypto.EVP_PKEY_RSA) {
175 throw new IllegalArgumentException("Invalid key type " + keyType);
178 private static void checkValidKeySize(int keyType, in argument
199 checkCorrectParametersSpec(int keyType, int keySize, AlgorithmParameterSpec spec) argument
376 setKeyType(String keyType) argument
[all...]
H A DAndroidKeyPairGenerator.java94 final int keyType = KeyStore.getKeyTypeForAlgorithm(mSpec.getKeyType());
95 byte[][] args = getArgsForKeyType(keyType, mSpec.getAlgorithmParameterSpec());
98 if (!mKeyStore.generate(privateKeyAlias, KeyStore.UID_SELF, keyType,
157 private static String getDefaultSignatureAlgorithmForKeyType(String keyType) { argument
158 if ("RSA".equalsIgnoreCase(keyType)) {
160 } else if ("DSA".equalsIgnoreCase(keyType)) {
162 } else if ("EC".equalsIgnoreCase(keyType)) {
165 throw new IllegalArgumentException("Unsupported key type " + keyType);
169 private static byte[][] getArgsForKeyType(int keyType, AlgorithmParameterSpec spec) { argument
170 switch (keyType) {
[all...]
H A DKeyStore.java71 static int getKeyTypeForAlgorithm(String keyType) throws IllegalArgumentException { argument
72 if ("RSA".equalsIgnoreCase(keyType)) {
74 } else if ("DSA".equalsIgnoreCase(keyType)) {
76 } else if ("EC".equalsIgnoreCase(keyType)) {
79 throw new IllegalArgumentException("Unsupported key type: " + keyType);
207 public boolean generate(String key, int uid, int keyType, int keySize, int flags, argument
210 return mBinder.generate(key, uid, keyType, keySize, flags, args) == NO_ERROR;
316 public boolean isHardwareBacked(String keyType) { argument
318 return mBinder.is_hardware_backed(keyType.toUpperCase(Locale.US)) == NO_ERROR;
/frameworks/base/core/java/android/security/
H A DIKeystoreService.java247 public int generate(String name, int uid, int keyType, int keySize, int flags, argument
256 _data.writeInt(keyType);
447 public int is_hardware_backed(String keyType) throws RemoteException { argument
453 _data.writeString(keyType);
575 public int generate(String name, int uid, int keyType, int keySize, int flags, byte[][] args) argument
/frameworks/av/include/media/
H A DIDrm.h48 String8 const &mimeType, DrmPlugin::KeyType keyType,
/frameworks/av/media/libmediaplayerservice/
H A DDrm.h53 String8 const &mimeType, DrmPlugin::KeyType keyType,
H A DDrm.cpp299 String8 const &mimeType, DrmPlugin::KeyType keyType,
312 return mPlugin->getKeyRequest(sessionId, initData, mimeType, keyType,
297 getKeyRequest(Vector<uint8_t> const &sessionId, Vector<uint8_t> const &initData, String8 const &mimeType, DrmPlugin::KeyType keyType, KeyedVector<String8, String8> const &optionalParameters, Vector<uint8_t> &request, String8 &defaultUrl) argument
/frameworks/base/keystore/tests/src/android/security/
H A DAndroidKeyPairGeneratorTest.java465 private void assertKeyPairCorrect(KeyPair pair, String alias, String keyType, int keySize, argument
470 assertEquals(keyType, pubKey.getAlgorithm());
472 if ("DSA".equalsIgnoreCase(keyType)) {
482 } else if ("EC".equalsIgnoreCase(keyType)) {
485 } else if ("RSA".equalsIgnoreCase(keyType)) {
498 assertEquals(keyType, privKey.getAlgorithm());
H A DAndroidKeyStoreTest.java1565 private void assertPrivateKeyEntryEquals(PrivateKeyEntry keyEntry, String keyType, byte[] key, argument
1567 KeyFactory keyFact = KeyFactory.getInstance(keyType);
/frameworks/av/drm/mediadrm/plugins/mock/
H A DMockDrmCryptoPlugin.cpp112 String8 const &mimeType, KeyType keyType,
118 ", keyType=%d, optionalParameters=%s))",
120 keyType, stringMapToString(optionalParameters).string());
131 // string keyType -> mock-keytype
138 keyTypeStr.appendFormat("%d", (int)keyType);
110 getKeyRequest(Vector<uint8_t> const &sessionId, Vector<uint8_t> const &initData, String8 const &mimeType, KeyType keyType, KeyedVector<String8, String8> const &optionalParameters, Vector<uint8_t> &request, String8 &defaultUrl) argument
H A DMockDrmCryptoPlugin.h63 String8 const &mimeType, KeyType keyType,
/frameworks/av/media/libmedia/
H A DIDrm.cpp122 String8 const &mimeType, DrmPlugin::KeyType keyType,
131 data.writeInt32((uint32_t)keyType);
491 DrmPlugin::KeyType keyType = (DrmPlugin::KeyType)data.readInt32(); local
506 mimeType, keyType,
120 getKeyRequest(Vector<uint8_t> const &sessionId, Vector<uint8_t> const &initData, String8 const &mimeType, DrmPlugin::KeyType keyType, KeyedVector<String8, String8> const &optionalParameters, Vector<uint8_t> &request, String8 &defaultUrl) argument
/frameworks/base/media/java/android/media/
H A DMediaDrm.java352 * @param scope may be a sessionId or a keySetId, depending on the specified keyType.
353 * When the keyType is KEY_TYPE_STREAMING or KEY_TYPE_OFFLINE,
354 * scope should be set to the sessionId the keys will be provided to. When the keyType
360 * required in generating the key request. init may be null when keyType is
363 * @param keyType specifes the type of the request. The request may be to acquire
373 String mimeType, int keyType,
372 getKeyRequest(byte[] scope, byte[] init, String mimeType, int keyType, HashMap<String, String> optionalParameters) argument
/frameworks/native/include/media/drm/
H A DDrmAPI.h112 // specified keyType. When the keyType is kKeyType_Offline or
114 // provided to. When the keyType is kKeyType_Release, scope should be set to
122 // in generating the key request. Init may be null when keyType is
127 // keyType specifies if the keys are to be used for streaming or offline content
136 String8 const &mimeType, KeyType keyType,
/frameworks/base/core/java/android/widget/
H A DGridLayout.java2129 private final Class<K> keyType; field in class:GridLayout.Assoc
2132 private Assoc(Class<K> keyType, Class<V> valueType) { argument
2133 this.keyType = keyType;
2137 public static <K, V> Assoc<K, V> of(Class<K> keyType, Class<V> valueType) { argument
2138 return new Assoc<K, V>(keyType, valueType);
2148 K[] keys = (K[]) Array.newInstance(keyType, N);
/frameworks/support/v7/gridlayout/src/android/support/v7/widget/
H A DGridLayout.java2012 private final Class<K> keyType; field in class:GridLayout.Assoc
2015 private Assoc(Class<K> keyType, Class<V> valueType) { argument
2016 this.keyType = keyType;
2020 public static <K, V> Assoc<K, V> of(Class<K> keyType, Class<V> valueType) { argument
2021 return new Assoc<K, V>(keyType, valueType);
2031 K[] keys = (K[]) Array.newInstance(keyType, N);
/frameworks/base/media/jni/
H A Dandroid_media_MediaDrm.cpp696 DrmPlugin::KeyType keyType; local
698 keyType = DrmPlugin::kKeyType_Streaming;
700 keyType = DrmPlugin::kKeyType_Offline;
702 keyType = DrmPlugin::kKeyType_Release;
705 "invalid keyType");
718 keyType, optParams, request, defaultUrl);

Completed in 384 milliseconds