Home
last modified time | relevance | path

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

1234

/cts/tests/tests/keystore/src/android/keystore/cts/
DKeyGenParameterSpecTest.java39 import java.security.spec.AlgorithmParameterSpec;
40 import java.security.spec.ECGenParameterSpec;
58 KeyGenParameterSpec spec = new KeyGenParameterSpec.Builder( in testDefaults() local
62 assertEquals("arbitrary", spec.getKeystoreAlias()); in testDefaults()
63 assertEquals(KeyProperties.PURPOSE_ENCRYPT, spec.getPurposes()); in testDefaults()
64 assertNull(null, spec.getAlgorithmParameterSpec()); in testDefaults()
65 MoreAsserts.assertEmpty(Arrays.asList(spec.getBlockModes())); in testDefaults()
66 assertEquals(DEFAULT_CERT_NOT_BEFORE, spec.getCertificateNotBefore()); in testDefaults()
67 assertEquals(DEFAULT_CERT_NOT_AFTER, spec.getCertificateNotAfter()); in testDefaults()
68 assertEquals(DEFAULT_CERT_SERIAL_NUMBER, spec.getCertificateSerialNumber()); in testDefaults()
[all …]
DKeyProtectionTest.java46 KeyProtection spec = new KeyProtection.Builder(KeyProperties.PURPOSE_ENCRYPT) in testDefaults() local
49 assertEquals(KeyProperties.PURPOSE_ENCRYPT, spec.getPurposes()); in testDefaults()
50 MoreAsserts.assertEmpty(Arrays.asList(spec.getBlockModes())); in testDefaults()
51 assertFalse(spec.isDigestsSpecified()); in testDefaults()
53 spec.getDigests(); in testDefaults()
57 assertFalse(spec.isMgf1DigestsSpecified()); in testDefaults()
58 assertThrows(IllegalStateException.class, spec::getMgf1Digests); in testDefaults()
60 MoreAsserts.assertEmpty(Arrays.asList(spec.getEncryptionPaddings())); in testDefaults()
61 assertNull(spec.getKeyValidityStart()); in testDefaults()
62 assertNull(spec.getKeyValidityForOriginationEnd()); in testDefaults()
[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;
56 IvParameterSpec spec = params.getParameterSpec(IvParameterSpec.class); in getIv() local
57 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.java52 import java.security.spec.ECPrivateKeySpec;
53 import java.security.spec.ECPublicKeySpec;
54 import java.security.spec.InvalidKeySpecException;
55 import java.security.spec.KeySpec;
56 import java.security.spec.PKCS8EncodedKeySpec;
57 import java.security.spec.RSAPrivateKeySpec;
58 import java.security.spec.RSAPublicKeySpec;
59 import java.security.spec.X509EncodedKeySpec;
69 import javax.crypto.spec.SecretKeySpec;
269 ECPublicKeySpec spec = in testGetKeySpecWithKeystorePublicKeyAcceptsTransparentKeySpec() local
[all …]
DKeyPairGeneratorSpecTest.java59 KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_Unencrypted_Success() local
67 assertEquals("Context should be the one specified", getContext(), spec.getContext()); in testBuilder_Unencrypted_Success()
69 assertEquals("Alias should be the one specified", TEST_ALIAS_1, spec.getKeystoreAlias()); in testBuilder_Unencrypted_Success()
71 assertEquals("subjectDN should be the one specified", TEST_DN_1, spec.getSubjectDN()); in testBuilder_Unencrypted_Success()
73 assertEquals("startDate should be the one specified", NOW, spec.getStartDate()); in testBuilder_Unencrypted_Success()
75 assertEquals("endDate should be the one specified", NOW_PLUS_10_YEARS, spec.getEndDate()); in testBuilder_Unencrypted_Success()
77 assertFalse("encryption flag should not be on", spec.isEncryptionRequired()); in testBuilder_Unencrypted_Success()
DStrongboxDESedeECBNoPaddingCipherTest.java20 import java.security.spec.AlgorithmParameterSpec;
21 import java.security.spec.InvalidParameterSpecException;
DDESedeECBPKCS7PaddingCipherTest.java6 import java.security.spec.AlgorithmParameterSpec;
7 import java.security.spec.InvalidParameterSpecException;
DDESedeECBNoPaddingCipherTest.java6 import java.security.spec.AlgorithmParameterSpec;
7 import java.security.spec.InvalidParameterSpecException;
DAESGCMCipherTestBase.java25 import java.security.spec.AlgorithmParameterSpec;
26 import java.security.spec.InvalidParameterSpecException;
30 import javax.crypto.spec.GCMParameterSpec;
66 GCMParameterSpec spec = params.getParameterSpec(GCMParameterSpec.class); in getIv() local
67 return spec.getIV(); in getIv()
DKeyGeneratorTest.java49 import java.security.spec.AlgorithmParameterSpec;
50 import java.security.spec.ECGenParameterSpec;
63 import javax.crypto.spec.IvParameterSpec;
299 KeyGenParameterSpec spec; in testAesKeySupportedSizesHelper() local
301 spec = TestUtils.buildUpon( in testAesKeySupportedSizesHelper()
305 spec = TestUtils.buildUpon( in testAesKeySupportedSizesHelper()
315 keyGenerator.init(spec, rng); in testAesKeySupportedSizesHelper()
324 keyGenerator.init(spec, rng); in testAesKeySupportedSizesHelper()
347 KeyGenParameterSpec spec; in testDESKeySupportedSizes() local
349 spec = TestUtils.buildUpon(goodSpec.setKeySize(i)).build(); in testDESKeySupportedSizes()
[all …]
DNoAttestKeyTest.java132 private Certificate[] generateKeyPair(String algorithm, KeyGenParameterSpec spec) in generateKeyPair() argument
136 keyPairGenerator.initialize(spec); in generateKeyPair()
138 mAliasesToDelete.add(spec.getKeystoreAlias()); in generateKeyPair()
140 return mKeyStore.getCertificateChain(spec.getKeystoreAlias()); in generateKeyPair()
DKeyAgreementTest.java49 import java.security.spec.ECGenParameterSpec;
50 import java.security.spec.InvalidKeySpecException;
259 private static KeyPair generateEphemeralAndroidKeyPair(ECGenParameterSpec spec) in generateEphemeralAndroidKeyPair() argument
265 if (spec != null) { in generateEphemeralAndroidKeyPair()
266 specBuilder.setAlgorithmParameterSpec(spec); in generateEphemeralAndroidKeyPair()
/cts/tests/translation/src/android/translation/cts/unittests/
DTranslationSpecTest.java38 final TranslationSpec spec = in testSpec_nullLanguage()
45 …final TranslationSpec spec = new TranslationSpec(ULocale.ENGLISH, TranslationSpec.DATA_FORMAT_TEXT… in testSpec_validSpec() local
47 assertThat(spec.getDataFormat()).isEqualTo(TranslationSpec.DATA_FORMAT_TEXT); in testSpec_validSpec()
48 assertThat(spec.getLocale()).isEqualTo(ULocale.ENGLISH); in testSpec_validSpec()
53 …final TranslationSpec spec = new TranslationSpec(ULocale.ENGLISH, TranslationSpec.DATA_FORMAT_TEXT… in testParceledSpec() local
55 assertThat(spec.getDataFormat()).isEqualTo(TranslationSpec.DATA_FORMAT_TEXT); in testParceledSpec()
56 assertThat(spec.getLocale()).isEqualTo(ULocale.ENGLISH); in testParceledSpec()
59 spec.writeToParcel(parcel, 0); in testParceledSpec()
/cts/hostsidetests/theme/app/src/android/theme/app/
DThemeInfo.java26 public final int spec; field in ThemeInfo
31 ThemeInfo(int spec, int id, int apiLevel, String name) { in ThemeInfo() argument
32 this.spec = spec; in ThemeInfo()
/cts/tests/tests/keystore/src/android/keystore/cts/util/
DTestUtils.java76 import java.security.spec.ECParameterSpec;
77 import java.security.spec.EllipticCurve;
78 import java.security.spec.InvalidKeySpecException;
79 import java.security.spec.PKCS8EncodedKeySpec;
90 import javax.crypto.spec.SecretKeySpec;
720 KeyProtection spec, Integer newPurposes) { in buildUponInternal() argument
721 int purposes = (newPurposes == null) ? spec.getPurposes() : newPurposes; in buildUponInternal()
723 result.setBlockModes(spec.getBlockModes()); in buildUponInternal()
724 if (spec.isDigestsSpecified()) { in buildUponInternal()
725 result.setDigests(spec.getDigests()); in buildUponInternal()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DGridLayoutTest.java19 import static android.widget.GridLayout.spec;
176 new GridLayout.LayoutParams(GridLayout.spec(0), GridLayout.spec(0))); in testCheckLayoutParams()
217 GridLayout.LayoutParams lp = new GridLayout.LayoutParams(spec(0), spec(0)); in populate()
225 GridLayout.LayoutParams lp = new GridLayout.LayoutParams(spec(row), spec(0)); in populate()
236 GridLayout.LayoutParams lp = new GridLayout.LayoutParams(spec(0), spec(col)); in populate()
250 GridLayout.LayoutParams lp = new GridLayout.LayoutParams(spec(row), spec(col)); in populate()
/cts/hostsidetests/appsearch/test-apps/AppSearchHostTestHelperA/src/android/appsearch/app/helper_a/
DEnterpriseContactsDeviceTest.java188 SearchSpec spec = new SearchSpec.Builder() in testHasEnterpriseAccess() local
192 SearchResultsShim searchResults = mEnterpriseSession.search("", spec); in testHasEnterpriseAccess()
205 SearchSpec spec = new SearchSpec.Builder() in testDoesNotHaveEnterpriseAccess() local
209 SearchResultsShim searchResults = mEnterpriseSession.search("", spec); in testDoesNotHaveEnterpriseAccess()
297 SearchSpec spec = new SearchSpec.Builder() in testSearchEnterpriseContacts() local
302 SearchResultsShim searchResults = mEnterpriseSession.search("", spec); in testSearchEnterpriseContacts()
322 searchResults = mEnterpriseSession.search("affiliation OR note OR address", spec); in testSearchEnterpriseContacts()
329 SearchSpec spec = new SearchSpec.Builder() in testSearchEnterpriseContacts_withProjection() local
340 SearchResultsShim searchResults = mEnterpriseSession.search("", spec); in testSearchEnterpriseContacts_withProjection()
357 searchResults = mEnterpriseSession.search("affiliation OR note OR address", spec); in testSearchEnterpriseContacts_withProjection()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/certificates/
DCertificates.java26 import java.security.spec.InvalidKeySpecException;
27 import java.security.spec.PKCS8EncodedKeySpec;
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/
DKeystoreAttestationDeviceInfo.java51 import java.security.spec.ECGenParameterSpec;
79 private void generateKeyPair(String algorithm, KeyGenParameterSpec spec) in generateKeyPair() argument
85 keyPairGenerator.initialize(spec); in generateKeyPair()
121 KeyGenParameterSpec spec = in loadCertAndCollectAttestation() local
133 generateKeyPair(KEY_ALGORITHM_EC, spec); in loadCertAndCollectAttestation()
/cts/tests/tests/wifi/src/android/net/wifi/cts/
DFakeKeys.java27 import java.security.spec.InvalidKeySpecException;
28 import java.security.spec.PKCS8EncodedKeySpec;
/cts/tests/autofillservice/src/android/autofillservice/cts/unittests/
DInlinePresentationTest.java88 InlinePresentationSpec spec = createSpec ? new InlinePresentationSpec.Builder( in createInlinePresentation() local
90 return new InlinePresentation(slice, spec, /* pined */ false); in createInlinePresentation()

1234