Home
last modified time | relevance | path

Searched refs:Util (Results 1 – 19 of 19) sorted by relevance

/cts/tests/tests/identity/src/android/security/identity/cts/
DProvisioningTest.java153 .putEntry(mdlNs, "First name", idsNoAuth, Util.cborEncodeString("Alan")) in createCredentialWithChallengeAndAcpId()
154 .putEntry(mdlNs, "Last name", idsNoAuth, Util.cborEncodeString("Turing")) in createCredentialWithChallengeAndAcpId()
156 Util.cborEncodeString("Maida Vale, London, England")) in createCredentialWithChallengeAndAcpId()
157 .putEntry(mdlNs, "Birth date", idsNoAuth, Util.cborEncodeString("19120623")) in createCredentialWithChallengeAndAcpId()
158 .putEntry(mdlNs, "Cryptanalyst", idsNoAuth, Util.cborEncodeBoolean(true)) in createCredentialWithChallengeAndAcpId()
159 .putEntry(mdlNs, "Portrait image", idsNoAuth, Util.cborEncodeBytestring( in createCredentialWithChallengeAndAcpId()
161 .putEntry(mdlNs, "Height", idsNoAuth, Util.cborEncodeInt(180)) in createCredentialWithChallengeAndAcpId()
162 .putEntry(mdlNs, "Neg Item", idsNoAuth, Util.cborEncodeInt(-42)) in createCredentialWithChallengeAndAcpId()
163 .putEntry(mdlNs, "Int Two Bytes", idsNoAuth, Util.cborEncodeInt(0x101)) in createCredentialWithChallengeAndAcpId()
164 .putEntry(mdlNs, "Int Four Bytes", idsNoAuth, Util.cborEncodeInt(0x10001)) in createCredentialWithChallengeAndAcpId()
[all …]
DDynamicAuthTest.java65 assumeTrue("IC HAL is not implemented", Util.isHalImplemented()); in dynamicAuthTest()
91 Util.createItemsRequest(entriesToRequest, null), in dynamicAuthTest()
97 String pretty = Util.cborPrettyPrint(Util.canonicalizeCbor(resultCbor)); in dynamicAuthTest()
110 KeyPair readerEphemeralKeyPair = Util.createEphemeralKeyPair(); in dynamicAuthTest()
117 byte[] sessionTranscript = Util.buildSessionTranscript(ephemeralKeyPair); in dynamicAuthTest()
122 Util.createItemsRequest(entriesToRequest, null), in dynamicAuthTest()
213 Util.createItemsRequest(entriesToRequest, null), in dynamicAuthTest()
239 sessionTranscript = Util.buildSessionTranscript(ephemeralKeyPair); in dynamicAuthTest()
241 Util.createItemsRequest(entriesToRequest, null), in dynamicAuthTest()
247 String pretty = Util.cborPrettyPrint(Util.canonicalizeCbor(resultCbor)); in dynamicAuthTest()
[all …]
DCreateItemsRequestTest.java46 Util.cborPrettyPrint(Util.createItemsRequest(entriesToRequest, docType))); in basicRequest()
68 Util.cborPrettyPrint(Util.createItemsRequest(entriesToRequest, docType))); in multipleNamespaces()
83 Util.cborPrettyPrint(Util.createItemsRequest(entriesToRequest, null))); in noDocType()
92 Util.cborPrettyPrint(Util.createItemsRequest(entriesToRequest, null))); in empty()
DHkdfTest.java83 byte[] hkdfWithNullSalt = Util.computeHkdf("HmacSha256", ikm, null, info, size); in testNullSaltOrInfo()
84 byte[] hkdfWithEmptySalt = Util.computeHkdf("HmacSha256", ikm, new byte[0], info, size); in testNullSaltOrInfo()
88 byte[] hkdfWithNullInfo = Util.computeHkdf("HmacSha256", ikm, salt, null, size); in testNullSaltOrInfo()
89 byte[] hkdfWithEmptyInfo = Util.computeHkdf("HmacSha256", ikm, salt, new byte[0], size); in testNullSaltOrInfo()
96 Util.computeHkdf("HmacSha256", new byte[0], new byte[0], new byte[0], 32 * 256); in testInvalidCodeSize()
195 Util.computeHkdf(macAlgorithm, hexDecode(ikmHex), hexDecode(saltHex), in computeHkdfHex()
DReaderAuthTest.java89 assumeTrue("IC HAL is not implemented", Util.isHalImplemented()); in readerAuth()
140 X509Certificate certASignedByC = Util.signPublicKeyWithPrivateKey("readerKeyA", in readerAuth()
142 X509Certificate certBSignedByC = Util.signPublicKeyWithPrivateKey("readerKeyB", in readerAuth()
205 Util.cborEncodeString("foo")) in readerAuth()
207 Util.cborEncodeString("bar")) in readerAuth()
209 Util.cborEncodeString("baz")) in readerAuth()
211 Util.cborEncodeString("bat")) in readerAuth()
214 byte[] proofOfProvisioning = Util.coseSign1GetData(proofOfProvisioningSignature); in readerAuth()
216 String pretty = Util.cborPrettyPrint(proofOfProvisioning); in readerAuth()
217 pretty = Util.replaceLine(pretty, 6, " 'readerCertificate' : [] // Removed"); in readerAuth()
[all …]
DUserAuthTest.java200 assumeTrue("IC HAL is not implemented", Util.isHalImplemented()); in doTestUserAuth()
244 Util.cborEncodeString("foo0")) in doTestUserAuth()
246 Util.cborEncodeString("foo1")) in doTestUserAuth()
249 byte[] proofOfProvisioning = Util.coseSign1GetData(proofOfProvisioningSignature); in doTestUserAuth()
251 String pretty = Util.cborPrettyPrint(proofOfProvisioning); in doTestUserAuth()
311 Util.createItemsRequest(entriesToRequest, null), in doTestUserAuth()
327 Util.getStringEntry(rd, "org.iso.18013-5.2019", "Accessible to all (0)")); in doTestUserAuth()
344 rd = credential.getEntries(Util.createItemsRequest(entriesToRequest, null), in doTestUserAuth()
360 Util.getStringEntry(rd, "org.iso.18013-5.2019", "Accessible to all (0)")); in doTestUserAuth()
362 Util.getStringEntry(rd, "org.iso.18013-5.2019", in doTestUserAuth()
[all …]
DEphemeralKeyTest.java63 assumeTrue("IC HAL is not implemented", Util.isHalImplemented()); in createEphemeralKey()
161 byte[] derivedKey = Util.computeHkdf("HmacSha256", sharedSecret, salt, info, 32); in TestReader()
165 derivedKey = Util.computeHkdf("HmacSha256", sharedSecret, salt, info,32); in TestReader()
DUtil.java95 class Util { class
570 byte[] toBeSigned = Util.coseBuildToBeSigned(encodedProtectedHeaders, in coseSign1CheckSignature()
827 return Util.cborDecodeString(data.getEntry(namespaceName, name)); in getStringEntry()
831 return Util.cborDecodeBoolean(data.getEntry(namespaceName, name)); in getBooleanEntry()
835 return Util.cborDecodeInt(data.getEntry(namespaceName, name)); in getIntegerEntry()
839 return Util.cborDecodeBytestring(data.getEntry(namespaceName, name)); in getBytestringEntry()
1012 return Util.prependSemanticTagForEncodedCbor(readerAuthentication); in buildReaderAuthenticationBytesCbor()
1044 Util.prependSemanticTagForEncodedCbor(encodedSessionTranscript); in calcEMacKeyForReader()
1048 byte[] derivedKey = Util.computeHkdf("HmacSha256", sharedSecret, salt, info, 32); in calcEMacKeyForReader()
1321 Util.hexdump("octetString", octetString); in getPopSha256FromAuthKeyCert()
[all …]
DAttestationTest.java54 assumeTrue("IC HAL is not implemented", Util.isHalImplemented()); in attestationTest()
DX509CertificateSigningTest.java87 X509Certificate cert = Util.signPublicKeyWithPrivateKey(keyToSignAlias, in testSigning()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DWavAnalyzer.java31 this.data = Util.toDouble(shortData); in WavAnalyzer()
84 coeffOfVar[i] = Util.std(powerAtFreq) / Util.mean(powerAtFreq); in isConsistent()
86 if (Util.mean(coeffOfVar) > 1.0) { in isConsistent()
107 if (Util.mean(dB) - Util.mean(noiseDB) < Common.SIGNAL_MIN_STRENGTH_DB_ABOVE_NOISE) { in responsePassesHifiTest()
113 int indexOf2000Hz = Util.findClosest(Common.FREQUENCIES_ORIGINAL, 2000.0); in responsePassesHifiTest()
115 int indexOf18500Hz = Util.findClosest(Common.FREQUENCIES_ORIGINAL, 18500.0); in responsePassesHifiTest()
116 int indexOf20000Hz = Util.findClosest(Common.FREQUENCIES_ORIGINAL, 20000.0); in responsePassesHifiTest()
119 if (Util.mean(responseInRange) < threshold) { in responsePassesHifiTest()
135 + Util.toLength(Common.PREFIX_LENGTH_S + Common.PAUSE_AFTER_PREFIX_DURATION_S, sampleRate); in measurePipStrength()
189 + Util.toLength(i * (Common.PIP_DURATION_S + Common.PAUSE_DURATION_S), sampleRate); in measurePipStrength()
[all …]
DSoundGenerator.java16 int prefixTotalLength = Util.toLength(Common.PREFIX_LENGTH_S, Common.PLAYING_SAMPLE_RATE_HZ) in SoundGenerator()
17 + Util.toLength(Common.PAUSE_BEFORE_PREFIX_DURATION_S, Common.PLAYING_SAMPLE_RATE_HZ) in SoundGenerator()
18 + Util.toLength(Common.PAUSE_AFTER_PREFIX_DURATION_S, Common.PLAYING_SAMPLE_RATE_HZ); in SoundGenerator()
19 int repetitionLength = pipNum * Util.toLength( in SoundGenerator()
26 Util.toLength(Common.PAUSE_BEFORE_PREFIX_DURATION_S, Common.PLAYING_SAMPLE_RATE_HZ), in SoundGenerator()
33 prefixTotalLength + i * Util.toLength( in SoundGenerator()
DCommon.java41 hann(Util.toLength(PIP_DURATION_S, RECORDING_SAMPLE_RATE_HZ));
43 hann(Util.toLength(PIP_DURATION_S, PLAYING_SAMPLE_RATE_HZ));
DUtil.java12 public class Util { class
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/
DUtil.java25 public class Util { class
26 private static final String LOG_TAG = Util.class.getSimpleName();
/cts/tests/tests/secure_element/sample_applet/src/com/android/cts/omapi/test/
DCtsAndroidOmapiTestApplet.java7 import javacard.framework.Util;
118 Util.arrayCopy(respBuf, (short)0, buf, (short)0, (short)respBuf.length); in process()
134 Util.arrayCopy(respBuf, (short)0, buf, (short)0, (short)respBuf.length); in process()
163 Util.arrayCopy(respBuf, (short)0, buf, (short)0, (short)respBuf.length); in process()
173 Util.arrayCopy(respBuf, (short)0, buf, (short)0, (short) respBuf.length); in process()
179 Util.arrayCopy(SW_62xx_VALIDATE_DATA_RESP, (short) 0, buf, (short) 0, in process()
242 Util.arrayCopy(p2_00, (short) 0, buf, (short) 0, (short) p2_00.length); in process()
305 Util.arrayCopyNonAtomic(resp_bytes256, (short)0, respBuf, in fillBytes()
/cts/tests/tests/mediaparser/src/android/media/mediaparser/cts/
DMediaParserTest.java37 import com.google.android.exoplayer2.util.Util;
564 Util.getBytesFromHexString("01020304050607080910111213141516"), 16), in testMatroskaOutOfBandCrypto()
565 /* newIv= */ Arrays.copyOf(Util.getBytesFromHexString("0101010101010101"), 16), in testMatroskaOutOfBandCrypto()
631 Util.getBytesFromHexString("91341951696b5e1ba232439ecec1f12a"), 16), in testMp4FragmentedOutOfBandCrypto()
632 /* newIv= */ Arrays.copyOf(Util.getBytesFromHexString("aab4ed0108dd5267"), 16), in testMp4FragmentedOutOfBandCrypto()
637 expectedCryptoInfo.iv = Arrays.copyOf(Util.getBytesFromHexString("aab4ed0108dd5272"), 16); in testMp4FragmentedOutOfBandCrypto()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/accessory/
DUsbAccessoryTestActivity.java19 import static com.android.cts.verifier.usb.Util.runAndAssertException;
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/device/
DUsbDeviceTestActivity.java19 import static com.android.cts.verifier.usb.Util.runAndAssertException;