Searched defs:keyType (Results 1 - 15 of 15) sorted by relevance

/frameworks/base/keystore/java/android/security/
H A DAndroidKeyPairGenerator.java93 final int keyType = KeyStore.getKeyTypeForAlgorithm(mSpec.getKeyType());
94 byte[][] args = getArgsForKeyType(keyType, mSpec.getAlgorithmParameterSpec());
97 if (!mKeyStore.generate(privateKeyAlias, KeyStore.UID_SELF, keyType,
156 private static String getDefaultSignatureAlgorithmForKeyType(String keyType) { argument
157 if ("RSA".equalsIgnoreCase(keyType)) {
159 } else if ("DSA".equalsIgnoreCase(keyType)) {
161 } else if ("EC".equalsIgnoreCase(keyType)) {
164 throw new IllegalArgumentException("Unsupported key type " + keyType);
168 private static byte[][] getArgsForKeyType(int keyType, AlgorithmParameterSpec spec) { argument
169 switch (keyType) {
[all...]
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 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/av/drm/mediadrm/plugins/clearkey/
H A DDrmPlugin.cpp48 KeyType keyType,
53 if (keyType != kKeyType_Streaming) {
44 getKeyRequest( const Vector<uint8_t>& scope, const Vector<uint8_t>& initData, const String8& initDataType, KeyType keyType, const KeyedVector<String8, String8>& 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
/frameworks/av/media/libmedia/
H A DIDrm.cpp126 String8 const &mimeType, DrmPlugin::KeyType keyType,
135 data.writeInt32((uint32_t)keyType);
552 DrmPlugin::KeyType keyType = (DrmPlugin::KeyType)data.readInt32(); local
567 mimeType, keyType,
124 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/av/media/libmediaplayerservice/
H A DDrm.cpp311 String8 const &mimeType, DrmPlugin::KeyType keyType,
324 return mPlugin->getKeyRequest(sessionId, initData, mimeType, keyType,
309 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/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);
631 public int generate(String name, int uid, int keyType, int keySize, int flags, byte[][] args) argument
/frameworks/av/media/ndk/
H A DNdkMediaDrm.cpp277 const uint8_t *init, size_t initSize, const char *mimeType, AMediaDrmKeyType keyType,
296 switch (keyType) {
276 AMediaDrm_getKeyRequest(AMediaDrm *mObj, const AMediaDrmScope *scope, const uint8_t *init, size_t initSize, const char *mimeType, AMediaDrmKeyType keyType, const AMediaDrmKeyValue *optionalParameters, size_t numOptionalParameters, const uint8_t **keyRequest, size_t *keyRequestSize) argument
/frameworks/base/media/java/android/media/
H A DMediaDrm.java413 * @param scope may be a sessionId or a keySetId, depending on the specified keyType.
414 * When the keyType is KEY_TYPE_STREAMING or KEY_TYPE_OFFLINE,
415 * scope should be set to the sessionId the keys will be provided to. When the keyType
421 * required in generating the key request. init may be null when keyType is
424 * @param keyType specifes the type of the request. The request may be to acquire
434 String mimeType, int keyType, HashMap<String, String> optionalParameters)
433 getKeyRequest(byte[] scope, byte[] init, String mimeType, int keyType, HashMap<String, String> optionalParameters) argument
/frameworks/base/media/jni/
H A Dandroid_media_MediaDrm.cpp751 DrmPlugin::KeyType keyType; local
753 keyType = DrmPlugin::kKeyType_Streaming;
755 keyType = DrmPlugin::kKeyType_Offline;
757 keyType = DrmPlugin::kKeyType_Release;
760 "invalid keyType");
773 keyType, optParams, request, defaultUrl);
/frameworks/base/core/java/android/widget/
H A DGridLayout.java2277 private final Class<K> keyType; field in class:GridLayout.Assoc
2280 private Assoc(Class<K> keyType, Class<V> valueType) { argument
2281 this.keyType = keyType;
2285 public static <K, V> Assoc<K, V> of(Class<K> keyType, Class<V> valueType) { argument
2286 return new Assoc<K, V>(keyType, valueType);
2296 K[] keys = (K[]) Array.newInstance(keyType, N);
/frameworks/support/v7/gridlayout/src/android/support/v7/widget/
H A DGridLayout.java2152 private final Class<K> keyType; field in class:GridLayout.Assoc
2155 private Assoc(Class<K> keyType, Class<V> valueType) { argument
2156 this.keyType = keyType;
2160 public static <K, V> Assoc<K, V> of(Class<K> keyType, Class<V> valueType) { argument
2161 return new Assoc<K, V>(keyType, valueType);
2171 K[] keys = (K[]) Array.newInstance(keyType, N);

Completed in 403 milliseconds