Home
last modified time | relevance | path

Searched refs:spec (Results 1 – 25 of 44) sorted by relevance

12

/cts/tests/tests/keystore/src/android/keystore/cts/
DKeyGenParameterSpecTest.java26 import java.security.spec.AlgorithmParameterSpec;
27 import java.security.spec.ECGenParameterSpec;
43 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder( in testDefaults() local
47 assertEquals("arbitrary", spec.getKeystoreAlias()); in testDefaults()
48 assertEquals(KeyProperties.PURPOSE_ENCRYPT, spec.getPurposes()); in testDefaults()
49 assertNull(null, spec.getAlgorithmParameterSpec()); in testDefaults()
50 MoreAsserts.assertEmpty(Arrays.asList(spec.getBlockModes())); in testDefaults()
51 assertEquals(DEFAULT_CERT_NOT_BEFORE, spec.getCertificateNotBefore()); in testDefaults()
52 assertEquals(DEFAULT_CERT_NOT_AFTER, spec.getCertificateNotAfter()); in testDefaults()
53 assertEquals(DEFAULT_CERT_SERIAL_NUMBER, spec.getCertificateSerialNumber()); in testDefaults()
[all …]
DKeyProtectionTest.java33 KeyProtection spec = new KeyProtection.Builder(KeyProperties.PURPOSE_ENCRYPT) in testDefaults() local
36 assertEquals(KeyProperties.PURPOSE_ENCRYPT, spec.getPurposes()); in testDefaults()
37 MoreAsserts.assertEmpty(Arrays.asList(spec.getBlockModes())); in testDefaults()
38 assertFalse(spec.isDigestsSpecified()); in testDefaults()
40 spec.getDigests(); in testDefaults()
43 MoreAsserts.assertEmpty(Arrays.asList(spec.getEncryptionPaddings())); in testDefaults()
44 assertNull(spec.getKeyValidityStart()); in testDefaults()
45 assertNull(spec.getKeyValidityForOriginationEnd()); in testDefaults()
46 assertNull(spec.getKeyValidityForConsumptionEnd()); in testDefaults()
47 assertTrue(spec.isRandomizedEncryptionRequired()); in testDefaults()
[all …]
DKeyPairGeneratorSpecTest.java43 KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_Unencrypted_Success() local
51 assertEquals("Context should be the one specified", getContext(), spec.getContext()); in testBuilder_Unencrypted_Success()
53 assertEquals("Alias should be the one specified", TEST_ALIAS_1, spec.getKeystoreAlias()); in testBuilder_Unencrypted_Success()
55 assertEquals("subjectDN should be the one specified", TEST_DN_1, spec.getSubjectDN()); in testBuilder_Unencrypted_Success()
57 assertEquals("startDate should be the one specified", NOW, spec.getStartDate()); in testBuilder_Unencrypted_Success()
59 assertEquals("endDate should be the one specified", NOW_PLUS_10_YEARS, spec.getEndDate()); in testBuilder_Unencrypted_Success()
61 assertFalse("encryption flag should not be on", spec.isEncryptionRequired()); in testBuilder_Unencrypted_Success()
65 KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_Encrypted_Success() local
74 assertEquals("Context should be the one specified", getContext(), spec.getContext()); in testBuilder_Encrypted_Success()
76 assertEquals("Alias should be the one specified", TEST_ALIAS_1, spec.getKeystoreAlias()); in testBuilder_Encrypted_Success()
[all …]
DAESCBCCipherTestBase.java20 import java.security.spec.AlgorithmParameterSpec;
21 import java.security.spec.InvalidParameterSpecException;
23 import javax.crypto.spec.IvParameterSpec;
54 IvParameterSpec spec = params.getParameterSpec(IvParameterSpec.class); in getIv() local
55 return spec.getIV(); in getIv()
DAESCTRCipherTestBase.java20 import java.security.spec.AlgorithmParameterSpec;
21 import java.security.spec.InvalidParameterSpecException;
23 import javax.crypto.spec.IvParameterSpec;
54 IvParameterSpec spec = params.getParameterSpec(IvParameterSpec.class); in getIv() local
55 return spec.getIV(); in getIv()
DDESedeCBCPKCS7PaddingCipherTest.java4 import java.security.spec.AlgorithmParameterSpec;
5 import java.security.spec.InvalidParameterSpecException;
7 import javax.crypto.spec.IvParameterSpec;
20 IvParameterSpec spec = params.getParameterSpec(IvParameterSpec.class); in getIv() local
21 return spec.getIV(); in getIv()
DDESedeCBCNoPaddingCipherTest.java4 import java.security.spec.AlgorithmParameterSpec;
5 import java.security.spec.InvalidParameterSpecException;
7 import javax.crypto.spec.IvParameterSpec;
20 IvParameterSpec spec = params.getParameterSpec(IvParameterSpec.class); in getIv() local
21 return spec.getIV(); in getIv()
DECCurves.java20 import java.security.spec.ECField;
21 import java.security.spec.ECFieldFp;
22 import java.security.spec.ECParameterSpec;
23 import java.security.spec.ECPoint;
24 import java.security.spec.EllipticCurve;
DKeyFactoryTest.java39 import java.security.spec.ECPrivateKeySpec;
40 import java.security.spec.ECPublicKeySpec;
41 import java.security.spec.InvalidKeySpecException;
42 import java.security.spec.KeySpec;
43 import java.security.spec.PKCS8EncodedKeySpec;
44 import java.security.spec.RSAPrivateKeySpec;
45 import java.security.spec.RSAPublicKeySpec;
46 import java.security.spec.X509EncodedKeySpec;
58 import javax.crypto.spec.SecretKeySpec;
240 ECPublicKeySpec spec = in testGetKeySpecWithKeystorePublicKeyAcceptsTransparentKeySpec() local
[all …]
DTestUtils.java54 import java.security.spec.ECParameterSpec;
55 import java.security.spec.EllipticCurve;
56 import java.security.spec.InvalidKeySpecException;
57 import java.security.spec.PKCS8EncodedKeySpec;
67 import javax.crypto.spec.SecretKeySpec;
505 KeyProtection spec, Integer newPurposes) { in buildUponInternal() argument
506 int purposes = (newPurposes == null) ? spec.getPurposes() : newPurposes; in buildUponInternal()
508 result.setBlockModes(spec.getBlockModes()); in buildUponInternal()
509 if (spec.isDigestsSpecified()) { in buildUponInternal()
510 result.setDigests(spec.getDigests()); in buildUponInternal()
[all …]
DDESedeECBPKCS7PaddingCipherTest.java4 import java.security.spec.AlgorithmParameterSpec;
5 import java.security.spec.InvalidParameterSpecException;
DDESedeECBNoPaddingCipherTest.java4 import java.security.spec.AlgorithmParameterSpec;
5 import java.security.spec.InvalidParameterSpecException;
DAESECBCipherTestBase.java20 import java.security.spec.AlgorithmParameterSpec;
21 import java.security.spec.InvalidParameterSpecException;
DAESGCMCipherTestBase.java22 import java.security.spec.AlgorithmParameterSpec;
23 import java.security.spec.InvalidParameterSpecException;
27 import javax.crypto.spec.GCMParameterSpec;
61 GCMParameterSpec spec = params.getParameterSpec(GCMParameterSpec.class); in getIv() local
62 return spec.getIV(); in getIv()
DKeyGeneratorTest.java33 import java.security.spec.AlgorithmParameterSpec;
34 import java.security.spec.ECGenParameterSpec;
231 KeyGenParameterSpec spec; in testAesKeySupportedSizes() local
233 spec = TestUtils.buildUpon(goodSpec.setKeySize(i)).build(); in testAesKeySupportedSizes()
236 spec = TestUtils.buildUpon(goodSpec.setKeySize(i)).build(); in testAesKeySupportedSizes()
244 keyGenerator.init(spec, rng); in testAesKeySupportedSizes()
250 keyGenerator.init(spec, rng); in testAesKeySupportedSizes()
272 KeyGenParameterSpec spec; in testHmacKeySupportedSizes() local
274 spec = getWorkingSpec().setKeySize(i).build(); in testHmacKeySupportedSizes()
277 spec = getWorkingSpec().setKeySize(i).build(); in testHmacKeySupportedSizes()
[all …]
DImportWrappedKeyTest.java56 import java.security.spec.AlgorithmParameterSpec;
57 import java.security.spec.RSAKeyGenParameterSpec;
61 import javax.crypto.spec.GCMParameterSpec;
62 import javax.crypto.spec.IvParameterSpec;
63 import javax.crypto.spec.OAEPParameterSpec;
64 import javax.crypto.spec.PSource;
65 import javax.crypto.spec.SecretKeySpec;
228 AlgorithmParameterSpec spec = new KeyGenParameterSpec.Builder(WRAPPING_KEY_ALIAS, in importWrappedKey() local
233 "RSA/ECB/OAEPPadding", spec); in importWrappedKey()
DKeyAttestationTest.java82 import java.security.spec.ECGenParameterSpec;
194 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder(keystoreAlias, PURPOSE_SIGN) in testEcAttestation_NoChallenge() local
203 generateKeyPair(KEY_ALGORITHM_EC, spec); in testEcAttestation_NoChallenge()
221 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder(keystoreAlias, PURPOSE_SIGN) in testEcAttestation_KeyStoreExceptionWhenRequestingUniqueId() local
229 generateKeyPair(KEY_ALGORITHM_EC, spec); in testEcAttestation_KeyStoreExceptionWhenRequestingUniqueId()
312 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder(keystoreAlias, PURPOSE_SIGN) in testRsaAttestation_NoChallenge() local
320 generateKeyPair(KEY_ALGORITHM_RSA, spec); in testRsaAttestation_NoChallenge()
338 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder(keystoreAlias, PURPOSE_ENCRYPT) in testAesAttestation() local
343 generateKey(spec, KeyProperties.KEY_ALGORITHM_AES); in testAesAttestation()
356 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder(keystoreAlias, PURPOSE_SIGN) in testHmacAttestation() local
[all …]
DBlockCipherTestBase.java37 import java.security.spec.AlgorithmParameterSpec;
38 import java.security.spec.InvalidParameterSpecException;
49 import javax.crypto.spec.IvParameterSpec;
50 import javax.crypto.spec.SecretKeySpec;
1340 protected void init(int opmode, Key key, AlgorithmParameters spec) in init() argument
1342 mCipher.init(opmode, key, spec); in init()
1346 protected void init(int opmode, Key key, AlgorithmParameters spec, SecureRandom random) in init() argument
1348 mCipher.init(opmode, key, spec, random); in init()
1352 protected void init(int opmode, Key key, AlgorithmParameterSpec spec) in init() argument
1354 mCipher.init(opmode, key, spec); in init()
[all …]
DKeyPairGeneratorTest.java46 import java.security.spec.AlgorithmParameterSpec;
47 import java.security.spec.ECGenParameterSpec;
48 import java.security.spec.ECParameterSpec;
49 import java.security.spec.RSAKeyGenParameterSpec;
158 KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(getContext()) in testInitialize_LegacySpec() local
165 getRsaGenerator().initialize(spec); in testInitialize_LegacySpec()
166 getRsaGenerator().initialize(spec, new SecureRandom()); in testInitialize_LegacySpec()
168 getEcGenerator().initialize(spec); in testInitialize_LegacySpec()
169 getEcGenerator().initialize(spec, new SecureRandom()); in testInitialize_LegacySpec()
173 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder( in testInitialize_ModernSpec() local
[all …]
DCipherTest.java41 import java.security.spec.AlgorithmParameterSpec;
42 import java.security.spec.MGF1ParameterSpec;
58 import javax.crypto.spec.GCMParameterSpec;
59 import javax.crypto.spec.IvParameterSpec;
60 import javax.crypto.spec.OAEPParameterSpec;
61 import javax.crypto.spec.PSource;
62 import javax.crypto.spec.SecretKeySpec;
608 OAEPParameterSpec spec = params.getParameterSpec(OAEPParameterSpec.class); in testCiphertextGeneratedByHighestPriorityProviderDecryptsByAndroidKeyStore() local
610 ((MGF1ParameterSpec) spec.getMGFParameters()) in testCiphertextGeneratedByHighestPriorityProviderDecryptsByAndroidKeyStore()
618 spec.getDigestAlgorithm(), in testCiphertextGeneratedByHighestPriorityProviderDecryptsByAndroidKeyStore()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DGridLayoutTest.java19 import static android.widget.GridLayout.spec;
166 new GridLayout.LayoutParams(GridLayout.spec(0), GridLayout.spec(0))); in testCheckLayoutParams()
207 GridLayout.LayoutParams lp = new GridLayout.LayoutParams(spec(0), spec(0)); in populate()
215 GridLayout.LayoutParams lp = new GridLayout.LayoutParams(spec(row), spec(0)); in populate()
226 GridLayout.LayoutParams lp = new GridLayout.LayoutParams(spec(0), spec(col)); in populate()
240 GridLayout.LayoutParams lp = new GridLayout.LayoutParams(spec(row), spec(col)); in populate()
DTabHostTest.java405 TabSpec spec = tabHost.newTabSpec("Tab 1"); in testKeyboardNavigation() local
406 spec.setContent(R.id.tab1); in testKeyboardNavigation()
407 spec.setIndicator("Tab 1"); in testKeyboardNavigation()
408 tabHost.addTab(spec); in testKeyboardNavigation()
409 spec = tabHost.newTabSpec("Tab 2"); in testKeyboardNavigation()
410 spec.setContent(R.id.tab2); in testKeyboardNavigation()
411 spec.setIndicator("Tab 2"); in testKeyboardNavigation()
412 tabHost.addTab(spec); in testKeyboardNavigation()
/cts/tests/tests/net/src/android/net/wifi/cts/
DFakeKeys.java27 import java.security.spec.InvalidKeySpecException;
28 import java.security.spec.PKCS8EncodedKeySpec;
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DKeyManagementTest.java60 import java.security.spec.InvalidKeySpecException;
61 import java.security.spec.PKCS8EncodedKeySpec;
299 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder( in testCanGenerateRSAKeyPair() local
309 getWho(), "RSA", spec, 0); in testCanGenerateRSAKeyPair()
320 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder( in testCanGenerateECKeyPair() local
327 getWho(), "EC", spec, 0); in testCanGenerateECKeyPair()
410 KeyGenParameterSpec spec = specBuilder.build(); in generateKeyAndCheckAttestation() local
412 getWho(), keyAlgorithm, spec, deviceIdAttestationFlags); in generateKeyAndCheckAttestation()
560 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder( in testCanSetKeyPairCert() local
567 getWho(), "EC", spec, 0); in testCanSetKeyPairCert()
[all …]
/cts/hostsidetests/theme/app/src/android/theme/app/
DThemeDeviceActivity.java155 if (view instanceof DatePicker && mTheme.spec == Theme.HOLO) { in setNextLayout()
188 public final int spec; field in ThemeDeviceActivity.Theme
193 private Theme(int spec, int id, int apiLevel, String name) { in Theme() argument
194 this.spec = spec; in Theme()

12