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/
DUtilUnitTests.java68 + "[1, 'text']", Util.cborPrettyPrint(baos.toByteArray())); in prettyPrintMultipleCompleteTypes()
75 assertEquals("'foobar'", Util.cborPrettyPrint(baos.toByteArray())); in prettyPrintString()
82 assertEquals("[0x01, 0x02, 0x21, 0xfe]", Util.cborPrettyPrint(baos.toByteArray())); in prettyPrintBytestring()
89 assertEquals("42", Util.cborPrettyPrint(baos.toByteArray())); in prettyPrintUnsignedInteger()
96 assertEquals("-42", Util.cborPrettyPrint(baos.toByteArray())); in prettyPrintNegativeInteger()
103 assertEquals("1.1", Util.cborPrettyPrint(baos.toByteArray())); in prettyPrintDouble()
107 assertEquals("-42.0000000001", Util.cborPrettyPrint(baos.toByteArray())); in prettyPrintDouble()
111 assertEquals("-5", Util.cborPrettyPrint(baos.toByteArray())); in prettyPrintDouble()
131 assertEquals("-5", Util.cborPrettyPrint(baos.toByteArray())); in prettyPrintFloat()
138 assertEquals("1.099609375", Util.cborPrettyPrint(baos.toByteArray())); in prettyPrintHalfFloat()
[all …]
DProvisioningTest.java152 .putEntry(mdlNs, "First name", idsNoAuth, Util.cborEncodeString("Alan")) in createCredentialWithChallengeAndAcpId()
153 .putEntry(mdlNs, "Last name", idsNoAuth, Util.cborEncodeString("Turing")) in createCredentialWithChallengeAndAcpId()
155 Util.cborEncodeString("Maida Vale, London, England")) in createCredentialWithChallengeAndAcpId()
156 .putEntry(mdlNs, "Birth date", idsNoAuth, Util.cborEncodeString("19120623")) in createCredentialWithChallengeAndAcpId()
157 .putEntry(mdlNs, "Cryptanalyst", idsNoAuth, Util.cborEncodeBoolean(true)) in createCredentialWithChallengeAndAcpId()
158 .putEntry(mdlNs, "Portrait image", idsNoAuth, Util.cborEncodeBytestring( in createCredentialWithChallengeAndAcpId()
160 .putEntry(mdlNs, "Height", idsNoAuth, Util.cborEncodeInt(180)) in createCredentialWithChallengeAndAcpId()
161 .putEntry(mdlNs, "Neg Item", idsNoAuth, Util.cborEncodeInt(-42)) in createCredentialWithChallengeAndAcpId()
162 .putEntry(mdlNs, "Int Two Bytes", idsNoAuth, Util.cborEncodeInt(0x101)) in createCredentialWithChallengeAndAcpId()
163 .putEntry(mdlNs, "Int Four Bytes", idsNoAuth, Util.cborEncodeInt(0x10001)) in createCredentialWithChallengeAndAcpId()
[all …]
DDynamicAuthTest.java63 assumeTrue("IC HAL is not implemented", Util.isHalImplemented()); in dynamicAuthTest()
89 Util.createItemsRequest(entriesToRequest, null), in dynamicAuthTest()
95 String pretty = Util.cborPrettyPrint(Util.canonicalizeCbor(resultCbor)); in dynamicAuthTest()
108 KeyPair readerEphemeralKeyPair = Util.createEphemeralKeyPair(); in dynamicAuthTest()
115 byte[] sessionTranscript = Util.buildSessionTranscript(ephemeralKeyPair); in dynamicAuthTest()
120 Util.createItemsRequest(entriesToRequest, null), in dynamicAuthTest()
211 Util.createItemsRequest(entriesToRequest, null), in dynamicAuthTest()
237 sessionTranscript = Util.buildSessionTranscript(ephemeralKeyPair); in dynamicAuthTest()
239 Util.createItemsRequest(entriesToRequest, null), in dynamicAuthTest()
245 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()
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 …]
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()
DUserAuthTest.java188 assumeTrue("IC HAL is not implemented", Util.isHalImplemented()); in doTestUserAuth()
232 Util.cborEncodeString("foo0")) in doTestUserAuth()
234 Util.cborEncodeString("foo1")) in doTestUserAuth()
237 byte[] proofOfProvisioning = Util.coseSign1GetData(proofOfProvisioningSignature); in doTestUserAuth()
239 String pretty = Util.cborPrettyPrint(proofOfProvisioning); in doTestUserAuth()
299 Util.createItemsRequest(entriesToRequest, null), in doTestUserAuth()
315 Util.getStringEntry(rd, "org.iso.18013-5.2019", "Accessible to all (0)")); in doTestUserAuth()
332 rd = credential.getEntries(Util.createItemsRequest(entriesToRequest, null), in doTestUserAuth()
348 Util.getStringEntry(rd, "org.iso.18013-5.2019", "Accessible to all (0)")); in doTestUserAuth()
350 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.java89 class Util { class
530 byte[] toBeSigned = Util.coseBuildToBeSigned(encodedProtectedHeaders, in coseSign1CheckSignature()
787 return Util.cborDecodeString(data.getEntry(namespaceName, name)); in getStringEntry()
791 return Util.cborDecodeBoolean(data.getEntry(namespaceName, name)); in getBooleanEntry()
795 return Util.cborDecodeInt(data.getEntry(namespaceName, name)); in getIntegerEntry()
799 return Util.cborDecodeBytestring(data.getEntry(namespaceName, name)); in getBytestringEntry()
972 return Util.prependSemanticTagForEncodedCbor(readerAuthentication); in buildReaderAuthenticationBytesCbor()
1004 Util.prependSemanticTagForEncodedCbor(encodedSessionTranscript); in calcEMacKeyForReader()
1006 Util.concatArrays(sharedSecret, sessionTranscriptBytes); in calcEMacKeyForReader()
1012 byte[] derivedKey = Util.computeHkdf("HmacSha256", in calcEMacKeyForReader()
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/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/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/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;