Searched refs:keyAlgorithm (Results 1 – 5 of 5) sorted by relevance
/cts/tests/tests/keystore/src/android/keystore/cts/ |
D | TestUtils.java | 92 String keyAlgorithm = publicKey.getAlgorithm(); in assertKeyPairSelfConsistent() local 93 if ("EC".equalsIgnoreCase(keyAlgorithm)) { in assertKeyPairSelfConsistent() 103 } else if ("RSA".equalsIgnoreCase(keyAlgorithm)) { in assertKeyPairSelfConsistent() 113 fail("Unsuported key algorithm: " + keyAlgorithm); in assertKeyPairSelfConsistent() 554 static KeyPair getKeyPairForKeyAlgorithm(String keyAlgorithm, Iterable<KeyPair> keyPairs) { in getKeyPairForKeyAlgorithm() argument 556 if (keyAlgorithm.equalsIgnoreCase(keyPair.getPublic().getAlgorithm())) { in getKeyPairForKeyAlgorithm() 560 throw new IllegalArgumentException("No KeyPair for key algorithm " + keyAlgorithm); in getKeyPairForKeyAlgorithm() 563 static Key getKeyForKeyAlgorithm(String keyAlgorithm, Iterable<? extends Key> keys) { in getKeyForKeyAlgorithm() argument 565 if (keyAlgorithm.equalsIgnoreCase(key.getAlgorithm())) { in getKeyForKeyAlgorithm() 569 throw new IllegalArgumentException("No Key for key algorithm " + keyAlgorithm); in getKeyForKeyAlgorithm() [all …]
|
D | MacTest.java | 549 String macAlgorithm, String keyAlgorithm, KeyProtection keyProtection) in assertInitSucceeds() argument 551 SecretKey key = importDefaultKatKey(keyAlgorithm, keyProtection); in assertInitSucceeds() 562 String macAlgorithm, String keyAlgorithm, KeyProtection keyProtection) in assertInitThrowsInvalidKeyException() argument 564 SecretKey key = importDefaultKatKey(keyAlgorithm, keyProtection); in assertInitThrowsInvalidKeyException() 569 + ", key algorithm: " + keyAlgorithm); in assertInitThrowsInvalidKeyException() 573 private SecretKey getDefaultKatKey(String keyAlgorithm) { in getDefaultKatKey() argument 574 return new SecretKeySpec(KAT_KEY, keyAlgorithm); in getDefaultKatKey() 577 private SecretKey importDefaultKatKey(String keyAlgorithm) throws Exception { in importDefaultKatKey() argument 579 keyAlgorithm, in importDefaultKatKey() 584 String keyAlgorithm, KeyProtection keyProtection) throws Exception { in importDefaultKatKey() argument [all …]
|
D | CipherTest.java | 1330 String keyAlgorithm = TestUtils.getCipherKeyAlgorithm(transformation); in testEntropyConsumption() local 1331 if (KeyProperties.KEY_ALGORITHM_AES.equalsIgnoreCase(keyAlgorithm)) { in testEntropyConsumption() 1349 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in testEntropyConsumption() 1366 if (KeyProperties.KEY_ALGORITHM_AES.equalsIgnoreCase(keyAlgorithm)) { in testEntropyConsumption() 1368 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in testEntropyConsumption() 1391 throw new RuntimeException("Unsupported key algorithm: " + keyAlgorithm); in testEntropyConsumption() 1424 String keyAlgorithm = TestUtils.getCipherKeyAlgorithm(transformation); in getWorkingDecryptionParameterSpec() local 1425 if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in getWorkingDecryptionParameterSpec() 1427 } else if (KeyProperties.KEY_ALGORITHM_AES.equalsIgnoreCase(keyAlgorithm)) { in getWorkingDecryptionParameterSpec() 1443 throw new IllegalArgumentException("Unsupported key algorithm: " + keyAlgorithm); in getWorkingDecryptionParameterSpec() [all …]
|
D | SignatureTest.java | 727 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(algorithm); in testLongMsgKat() local 729 && (!KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm))) { in testLongMsgKat() 1149 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(signatureAlgorithm); in getDefaultKeyAndCertResIds() local 1150 if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm)) { in getDefaultKeyAndCertResIds() 1152 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in getDefaultKeyAndCertResIds() 1155 throw new IllegalArgumentException("Unknown key algorithm: " + keyAlgorithm); in getDefaultKeyAndCertResIds() 1160 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(signatureAlgorithm); in importDefaultKatKeyPair() local 1163 if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKeyPair() 1170 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in importDefaultKatKeyPair() 1178 throw new IllegalArgumentException("Unsupported key algorithm: " + keyAlgorithm); in importDefaultKatKeyPair() [all …]
|
D | RSASignatureTest.java | 47 String keyAlgorithm = TestUtils.getSignatureAlgorithmKeyAlgorithm(algorithm); 48 if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) {
|