Home
last modified time | relevance | path

Searched refs:spec (Results 1 – 25 of 39) 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 …]
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()
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()
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.java51 import java.security.spec.ECParameterSpec;
52 import java.security.spec.EllipticCurve;
53 import java.security.spec.InvalidKeySpecException;
54 import java.security.spec.PKCS8EncodedKeySpec;
64 import javax.crypto.spec.SecretKeySpec;
486 KeyProtection spec, Integer newPurposes) { in buildUponInternal() argument
487 int purposes = (newPurposes == null) ? spec.getPurposes() : newPurposes; in buildUponInternal()
489 result.setBlockModes(spec.getBlockModes()); in buildUponInternal()
490 if (spec.isDigestsSpecified()) { in buildUponInternal()
491 result.setDigests(spec.getDigests()); in buildUponInternal()
[all …]
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;
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()
DAESECBCipherTestBase.java20 import java.security.spec.AlgorithmParameterSpec;
21 import java.security.spec.InvalidParameterSpecException;
DKeyGeneratorTest.java31 import java.security.spec.AlgorithmParameterSpec;
32 import java.security.spec.ECGenParameterSpec;
222 KeyGenParameterSpec spec; in testAesKeySupportedSizes() local
224 spec = TestUtils.buildUpon(goodSpec.setKeySize(i)).build(); in testAesKeySupportedSizes()
227 spec = TestUtils.buildUpon(goodSpec.setKeySize(i)).build(); in testAesKeySupportedSizes()
235 keyGenerator.init(spec, rng); in testAesKeySupportedSizes()
241 keyGenerator.init(spec, rng); in testAesKeySupportedSizes()
263 KeyGenParameterSpec spec; in testHmacKeySupportedSizes() local
265 spec = getWorkingSpec().setKeySize(i).build(); in testHmacKeySupportedSizes()
268 spec = getWorkingSpec().setKeySize(i).build(); in testHmacKeySupportedSizes()
[all …]
DKeyAttestationTest.java78 import java.security.spec.ECGenParameterSpec;
190 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder(keystoreAlias, PURPOSE_SIGN) in testEcAttestation_NoChallenge() local
199 generateKeyPair(KEY_ALGORITHM_EC, spec); in testEcAttestation_NoChallenge()
217 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder(keystoreAlias, PURPOSE_SIGN) in testEcAttestation_KeyStoreExceptionWhenRequestingUniqueId() local
225 generateKeyPair(KEY_ALGORITHM_EC, spec); in testEcAttestation_KeyStoreExceptionWhenRequestingUniqueId()
308 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder(keystoreAlias, PURPOSE_SIGN) in testRsaAttestation_NoChallenge() local
316 generateKeyPair(KEY_ALGORITHM_RSA, spec); in testRsaAttestation_NoChallenge()
334 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder(keystoreAlias, PURPOSE_ENCRYPT) in testAesAttestation() local
339 generateKey(spec, KeyProperties.KEY_ALGORITHM_AES); in testAesAttestation()
352 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.java34 import java.security.spec.AlgorithmParameterSpec;
35 import java.security.spec.MGF1ParameterSpec;
49 import javax.crypto.spec.GCMParameterSpec;
50 import javax.crypto.spec.IvParameterSpec;
51 import javax.crypto.spec.OAEPParameterSpec;
52 import javax.crypto.spec.PSource;
53 import javax.crypto.spec.SecretKeySpec;
442 OAEPParameterSpec spec = params.getParameterSpec(OAEPParameterSpec.class); in testCiphertextGeneratedByHighestPriorityProviderDecryptsByAndroidKeyStore() local
444 ((MGF1ParameterSpec) spec.getMGFParameters()) in testCiphertextGeneratedByHighestPriorityProviderDecryptsByAndroidKeyStore()
452 spec.getDigestAlgorithm(), in testCiphertextGeneratedByHighestPriorityProviderDecryptsByAndroidKeyStore()
[all …]
DAESCipherNistCavpKatTest.java36 import javax.crypto.spec.IvParameterSpec;
37 import javax.crypto.spec.SecretKeySpec;
DSecretKeyFactoryTest.java31 import java.security.spec.InvalidKeySpecException;
42 import javax.crypto.spec.SecretKeySpec;
/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()
/cts/tests/tests/net/src/android/net/wifi/cts/
DFakeKeys.java27 import java.security.spec.InvalidKeySpecException;
28 import java.security.spec.PKCS8EncodedKeySpec;
/cts/tools/dex-tools/
DREADME.txt5 It is designed to be fast and close to the spec.
18 doc : dex file spec on which this parser is based
/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()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DKeyManagementTest.java43 import java.security.spec.InvalidKeySpecException;
44 import java.security.spec.PKCS8EncodedKeySpec;
/cts/hostsidetests/devicepolicy/app/DelegateApp/src/com/android/cts/delegate/
DCertInstallDelegateTest.java39 import java.security.spec.PKCS8EncodedKeySpec;
/cts/tools/dasm/src/java_cup/
Dparser.cup10 spec looks like).
170 spec, package_spec, import_list, code_part, action_code_part,
181 start with spec;
185 spec ::=
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/
DCertInstallerReceiver.java29 import java.security.spec.PKCS8EncodedKeySpec;

12