Home
last modified time | relevance | path

Searched refs:getBytes (Results 1 – 25 of 159) sorted by relevance

1234567

/frameworks/base/services/tests/servicestests/src/com/android/server/
DLockSettingsStorageTests.java220 mStorage.writePasswordHash("thepassword".getBytes(), 0); in testPassword_Write()
222 assertArrayEquals("thepassword".getBytes(), mStorage.readPasswordHash(0).hash); in testPassword_Write()
224 assertArrayEquals("thepassword".getBytes(), mStorage.readPasswordHash(0).hash); in testPassword_Write()
228 mStorage.writePasswordHash("parentpasswordd".getBytes(), 1); in testPassword_WriteProfileWritesParent()
229 mStorage.writePasswordHash("profilepassword".getBytes(), 2); in testPassword_WriteProfileWritesParent()
231 assertArrayEquals("profilepassword".getBytes(), mStorage.readPasswordHash(1).hash); in testPassword_WriteProfileWritesParent()
232 assertArrayEquals("profilepassword".getBytes(), mStorage.readPasswordHash(2).hash); in testPassword_WriteProfileWritesParent()
234 assertArrayEquals("profilepassword".getBytes(), mStorage.readPasswordHash(1).hash); in testPassword_WriteProfileWritesParent()
235 assertArrayEquals("profilepassword".getBytes(), mStorage.readPasswordHash(2).hash); in testPassword_WriteProfileWritesParent()
239 mStorage.writePasswordHash("profilepassword".getBytes(), 2); in testPassword_WriteParentWritesProfile()
[all …]
DDropBoxTest.java92 dropbox.addData("DropBoxTest", "TEST".getBytes(), 0);
124 gz1.write("FILE1".getBytes());
125 os2.write("DATA2".getBytes());
126 gz3.write("DATA3".getBytes());
193 gz2.write("FUTURE2".getBytes()); in testAddEntriesInTheFuture()
528 dropbox.addData("DropBoxTest", "should be ignored".getBytes(), 0); in testCreateDropBoxManagerWithInvalidDirectory()
550 new DropBoxManager.Entry("bytes", 3000000, "Bytes Value".getBytes(), in testDropBoxEntrySerialization()
558 "Bad Bytes Value".getBytes(), in testDropBoxEntrySerialization()
574 os.write("File Value".getBytes()); in testDropBoxEntrySerialization()
608 gzout.write("Gzip File Value".getBytes()); in testDropBoxEntrySerialization()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/
DFileBridgeTest.java90 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteNoSync()
92 assertContents("meow".getBytes(StandardCharsets.UTF_8)); in testWriteNoSync()
97 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSync()
100 assertContents("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSync()
105 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite()
107 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite()
109 assertContents("meowcake".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite()
121 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose()
124 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose()
128 assertContents("meow".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose()
/frameworks/base/services/tests/servicestests/src/com/android/server/updates/
DCertPinInstallReceiverTest.java129 byte[] encoded = content.getBytes(); in getCurrentHash()
140 byte[] derKey = Base64.decode(TEST_KEY.getBytes(), Base64.DEFAULT); in createKey()
147 byte[] derCert = Base64.decode(TEST_CERT.getBytes(), Base64.DEFAULT); in createCertificate()
155 fw.write(content.getBytes(), 0, content.length()); in makeTemporaryContentFile()
164 signer.update(content.trim().getBytes()); in createSignature()
165 signer.update(version.trim().getBytes()); in createSignature()
166 signer.update(requiredHash.getBytes()); in createSignature()
177 signer.update(content.trim().getBytes()); in verifySignature()
178 signer.update(version.trim().getBytes()); in verifySignature()
179 signer.update(requiredPrevious.trim().getBytes()); in verifySignature()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DContainerEncryptionParamsTest.java31 private static final byte[] IV_BYTES = "FOOBAR".getBytes();
35 private static final byte[] ENC_KEY_BYTES = "abcd1234wxyz7890".getBytes();
41 private static final byte[] MAC_KEY_BYTES = "4wxyzabcd1237890".getBytes();
45 private static final byte[] MAC_TAG = "faketag".getBytes();
125 new String(ENC_ALGORITHM), new IvParameterSpec("BLAHBLAH".getBytes()), in testEquals_EncParams_Failure()
140 new SecretKeySpec("BLAHBLAH".getBytes(), "RAW"), new String(MAC_ALGORITHM), null, in testEquals_EncKey_Failure()
169 new SecretKeySpec("FAKE_MAC_KEY".getBytes(), "RAW"), MAC_TAG, AUTHENTICATED_START, in testEquals_MacKey_Failure()
183 new SecretKeySpec(MAC_KEY_BYTES.clone(), "RAW"), "broken".getBytes(), in testEquals_MacTag_Failure()
265 new String(ENC_ALGORITHM), new IvParameterSpec("BLAHBLAH".getBytes()), in testHashCode_EncParams_Failure()
280 new SecretKeySpec("BLAHBLAH".getBytes(), "RAW"), new String(MAC_ALGORITHM), null, in testHashCode_EncKey_Failure()
[all …]
DMacAuthenticatedInputStreamTest.java32 private static final SecretKey HMAC_KEY_1 = new SecretKeySpec("test_key_1".getBytes(), "HMAC");
34 private static final byte[] TEST_STRING_1 = "Hello, World!".getBytes();
DVerificationParamsTest.java36 private final static byte[] DIGEST_BYTES = "fake digest".getBytes();
131 new ManifestDigest("a different digest".getBytes())); in testEquals_ManifestDigest_Failure()
209 new ManifestDigest("a different digest".getBytes())); in testHashCode_ManifestDigest_Failure()
221 new ManifestDigest("a different digest".getBytes())); in testHashCode_InstallerUid_Failure()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DWap230WspContentTypeTest.java267 out.write(testType.getBytes("US-ASCII")); in testConstrainedMediaExtensionMedia()
283 out.write(testType.getBytes("US-ASCII")); in testGeneralFormShortLengthExtensionMedia()
451 out.write(testType.getBytes("US-ASCII")); in testGeneralFormLengthQuoteExtensionMedia()
476 out.write(testType.getBytes("US-ASCII")); in testGeneralFormLengthQuoteExtensionMediaWithNiceLongMimeType()
494 out.write(testType.getBytes("US-ASCII")); in testConstrainedMediaExtensionMediaWithSpace()
537 out.write("wdstechnology.com".getBytes("US-ASCII")); in testTypedParamWellKnownShortIntegerTokenText()
562 out.write("wdstechnology.com".getBytes("US-ASCII")); in testTypedParamWellKnownLongIntegerTokenText()
587 out.write("wdstechnology.com".getBytes("US-ASCII")); in testTypedParamWellKnownShortIntegerQuotedText()
655 out.write("imapc".getBytes("US-ASCII")); in testTypedParamWellKnownShortIntegerMultipleParameters()
676 out.write("MYPARAM".getBytes("US-ASCII")); in testUntypedParamIntegerValueShortInteger()
[all …]
/frameworks/base/core/tests/coretests/src/android/app/backup/
DBackupDataTest.java85 writeEntity(bdo, KEY1, DATA1.getBytes()); in testSingle()
93 readAndVerifyEntity(bdi, KEY1, DATA1.getBytes()); in testSingle()
105 writeEntity(bdo, KEYS[i], DATA[i].getBytes()); in testMultiple()
114 readAndVerifyEntity(bdi, KEYS[count], DATA[count].getBytes()); in testMultiple()
149 writeEntity(bdo, KEYS[i], DATA[i].getBytes()); i++; in testMixed()
150 writeEntity(bdo, KEYS[i], DATA[i].getBytes()); i++; in testMixed()
161 readAndVerifyEntity(bdi, KEYS[out], DATA[out].getBytes()); out++; in testMixed()
163 readAndVerifyEntity(bdi, KEYS[out], DATA[out].getBytes()); out++; in testMixed()
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DLoggingPrintStreamTest.java136 out.write(expected.getBytes("UTF-8")); in testMultiByteCharactersSpanningBuffers()
143 for (byte b : expected.getBytes()) { in testWriteOneByteAtATimeMultibyteCharacters()
152 out.write(expected.getBytes()); in testWriteByteArrayAtATimeMultibyteCharacters()
159 byte[] bytes = expected.getBytes(); in testWriteWithOffsetsMultibyteCharacters()
175 out.write(toWrite.getBytes()); in testWriteFlushesOnNewlines()
/frameworks/volley/src/test/java/com/android/volley/toolbox/
DJsonRequestCharsetTest.java58 byte[] data = jsonObjectString().getBytes(Charset.forName("UTF-8")); in defaultCharsetJsonObject()
71 byte[] data = jsonArrayString().getBytes(Charset.forName("UTF-8")); in defaultCharsetJsonArray()
83 byte[] data = jsonObjectString().getBytes(Charset.forName("ISO-8859-1")); in specifiedCharsetJsonObject()
97 byte[] data = jsonArrayString().getBytes(Charset.forName("ISO-8859-2")); in specifiedCharsetJsonArray()
/frameworks/base/core/tests/coretests/src/android/util/
DBase64Test.java42 String b64 = Base64.encodeToString(in.getBytes(), flags); in encodeToString()
249 assertEquals("YWJj".getBytes(), 4, encoder.output, encoder.op); in XXXtestEncodeInternal()
253 assertEquals("YWJj".getBytes(), 4, encoder.output, encoder.op); in XXXtestEncodeInternal()
265 assertEquals("YWFh".getBytes(), 4, encoder.output, encoder.op); in XXXtestEncodeInternal()
273 assertEquals("YWJh".getBytes(), 4, encoder.output, encoder.op); in XXXtestEncodeInternal()
277 assertEquals("YmFi".getBytes(), 4, encoder.output, encoder.op); in XXXtestEncodeInternal()
281 assertEquals("YQ".getBytes(), 2, encoder.output, encoder.op); in XXXtestEncodeInternal()
319 byte[] plain = (lipsum + lipsum + lipsum + lipsum + lipsum).getBytes(); in testInputStream()
413 new ByteArrayInputStream("/v8=".getBytes()), Base64.DEFAULT); in testSingleByteReads()
434 byte[] plain = (lipsum + lipsum).getBytes(); in testOutputStream()
/frameworks/base/core/java/android/nfc/
DNdefRecord.java224 public static final byte[] RTD_ANDROID_APP = "android.com:pkg".getBytes();
316 packageName.getBytes(StandardCharsets.UTF_8)); in createApplicationRecord()
355 byte[] uriBytes = uriString.getBytes(StandardCharsets.UTF_8); in createUri()
427 byte[] typeBytes = mimeType.getBytes(StandardCharsets.US_ASCII); in createMime()
467 byte[] byteDomain = domain.getBytes(StandardCharsets.UTF_8); in createExternal()
468 byte[] byteType = type.getBytes(StandardCharsets.UTF_8); in createExternal()
493 byte[] textBytes = text.getBytes(StandardCharsets.UTF_8); in createTextRecord()
497 languageCodeBytes = languageCode.getBytes(StandardCharsets.US_ASCII); in createTextRecord()
500 getBytes(StandardCharsets.US_ASCII); in createTextRecord()
/frameworks/opt/telephony/src/java/com/google/android/mms/pdu/
DSendReq.java35 setContentType("application/vnd.wap.multipart.related".getBytes()); in SendReq()
36 setFrom(new EncodedStringValue(PduHeaders.FROM_INSERT_ADDRESS_TOKEN_STR.getBytes())); in SendReq()
47 return transactionId.getBytes(); in generateTransactionId()
DPduComposer.java312 appendTextString(str.getBytes()); in appendTextString()
452 appendQuotedString(str.getBytes()); in appendQuotedString()
463 temp.appendTextString(STRING_PHONE_NUMBER_ADDRESS_TYPE.getBytes()); in appendAddressType()
466 temp.appendTextString(STRING_IPV4_ADDRESS_TYPE.getBytes()); in appendAddressType()
469 temp.appendTextString(STRING_IPV6_ADDRESS_TYPE.getBytes()); in appendAddressType()
605 PduHeaders.MESSAGE_CLASS_ADVERTISEMENT_STR.getBytes())) { in appendHeader()
608 PduHeaders.MESSAGE_CLASS_AUTO_STR.getBytes())) { in appendHeader()
611 PduHeaders.MESSAGE_CLASS_PERSONAL_STR.getBytes())) { in appendHeader()
614 PduHeaders.MESSAGE_CLASS_INFORMATIONAL_STR.getBytes())) { in appendHeader()
DPduPart.java96 static final byte[] DISPOSITION_FROM_DATA = "from-data".getBytes();
97 static final byte[] DISPOSITION_ATTACHMENT = "attachment".getBytes();
98 static final byte[] DISPOSITION_INLINE = "inline".getBytes();
DPduParser.java468 value.setTextString(str.getBytes()); in parseHeaders()
550 from.setTextString(str.getBytes()); in parseHeaders()
560 PduHeaders.FROM_INSERT_ADDRESS_TOKEN_STR.getBytes()); in parseHeaders()
596 PduHeaders.MESSAGE_CLASS_PERSONAL_STR.getBytes(), in parseHeaders()
600 PduHeaders.MESSAGE_CLASS_ADVERTISEMENT_STR.getBytes(), in parseHeaders()
604 PduHeaders.MESSAGE_CLASS_INFORMATIONAL_STR.getBytes(), in parseHeaders()
608 PduHeaders.MESSAGE_CLASS_AUTO_STR.getBytes(), in parseHeaders()
859 part.setContentType((PduContentTypes.contentTypes[0]).getBytes()); //"*/*" in parseParts()
895 System.currentTimeMillis()).getBytes()); in parseParts()
1395 byte[] type = (PduContentTypes.contentTypes[index]).getBytes(); in parseContentTypeParams()
[all …]
/frameworks/base/packages/DocumentsUI/tests/src/com/android/documentsui/
DCopyTest.java158 "The five boxing wizards jump quickly".getBytes()); in testCopyFile()
187 mStorage.createFile(SRC, srcPaths[0], "text/plain", testContent[0].getBytes()), in testCopyMultipleFiles()
188 mStorage.createFile(SRC, srcPaths[1], "text/plain", testContent[1].getBytes()), in testCopyMultipleFiles()
189 mStorage.createFile(SRC, srcPaths[2], "text/plain", testContent[2].getBytes())); in testCopyMultipleFiles()
226 "The five boxing wizards jump quickly".getBytes()); in testReadErrors()
/frameworks/base/wifi/java/android/net/wifi/p2p/nsd/
DWifiP2pDnsSdServiceInfo.java129 byte[] data = instanceName.getBytes(); in createPtrServiceQuery()
219 sb.append(WifiP2pServiceInfo.bin2HexStr(dnsName.getBytes())); in compressDnsName()
229 sb.append(WifiP2pServiceInfo.bin2HexStr(name.getBytes())); in compressDnsName()
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/
DMarshalQueryableString.java47 byte[] arr = value.getBytes(UTF8_CHARSET); in marshal()
55 byte[] arr = value.getBytes(UTF8_CHARSET); in calculateMarshalSize()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/omadm/
DOMAConstants.java52 byte[] octets = s.getBytes(StandardCharsets.UTF_8); in serializeString()
53 byte[] prefix = String.format("%x:", octets.length).getBytes(StandardCharsets.UTF_8); in serializeString()
DOMAConstructed.java108 out.write(String.format("(%s)", getContext()).getBytes(StandardCharsets.UTF_8)); in marshal()
116 out.write(".\n".getBytes(StandardCharsets.UTF_8)); in marshal()
/frameworks/base/services/tests/servicestests/src/com/android/server/content/
DSyncStorageEngineTest.java443 + "</accounts>").getBytes(); in testComponentParsing()
519 + "</accounts>").getBytes(); in testAuthorityParsingV2()
553 + "</accounts>\n").getBytes(); in testAuthorityParsingV2()
582 + "</accounts>\n").getBytes(); in testAuthorityParsingV2()
634 + "</accounts>\n").getBytes(); in testAuthorityParsing()
667 + "</accounts>\n").getBytes(); in testAuthorityParsing()
696 + "</accounts>\n").getBytes(); in testAuthorityParsing()
726 + "</accounts>\n").getBytes(); in testListenForTicklesParsing()
772 + "</accounts>\n").getBytes(); in testAuthorityRenaming()
812 + "</accounts>\n").getBytes(); in testSyncableMigration()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageManagerSettingsTests.java127 + "</packages>").getBytes()); in writePackagesXml()
137 .getBytes()); in writeStoppedPackagesXml()
145 .getBytes()); in writePackagesList()
/frameworks/opt/bluetooth/src/android/bluetooth/client/map/
DBluetoothMapBmessageParser.java308 byte[] data = remng.getBytes(); in parseBody()
401 p.parse(new ByteArrayInputStream(str.getBytes())); in parseVcard()
413 p.parse(new ByteArrayInputStream(str.getBytes())); in parseVcard()

1234567