Home
last modified time | relevance | path

Searched refs:toBytes (Results 1 – 24 of 24) sorted by relevance

/external/rappor/client/javatest/com/google/android/rappor/
DEncoderTest.java54 private static byte[] toBytes(long value) { in toBytes() method in EncoderTest
431 .encodeBits(toBytes(0b11111101L)))); in testEncoderEncodeBits_identity()
445 .encodeBits(toBytes(0xD56B8119L)))); in testEncoderEncodeBits_identity()
459 encoder.encodeBits(toBytes(0x100)); // 9 bits in testEncoderEncodeBits_tooHigh()
642 .encodeBits(toBytes(0b11111101L)))); in testEncoderEncodeBits_prrMemoizes()
656 .encodeBits(toBytes(0b11111101L)))); in testEncoderEncodeBits_prrMemoizes()
677 long encoded = toLong(encoder.encodeBits(toBytes(inputValue))); in testEncoderEncodeBits_prrFlipProbability()
678 assertEquals(encoded, toLong(encoder.encodeBits(toBytes(inputValue)))); in testEncoderEncodeBits_prrFlipProbability()
730 long encoded = toLong(encoder.encodeBits(toBytes(inputValue))); in testEncoderEncodeBits_irrFlipProbability()
791 .encodeBits(toBytes(inputValue)))); in testEncoderEncodeBits_endToEnd()
[all …]
/external/conscrypt/openjdk-integ-tests/src/test/java/org/conscrypt/javax/crypto/
DCipherBasicsTest.java114 Key key = new SecretKeySpec(toBytes(line[KEY_INDEX]), in testBasicEncryption()
116 byte[] iv = toBytes(line[IV_INDEX]); in testBasicEncryption()
117 byte[] plaintext = toBytes(line[PLAINTEXT_INDEX]); in testBasicEncryption()
118 byte[] ciphertext = toBytes(line[CIPHERTEXT_INDEX]); in testBasicEncryption()
166 Key key = new SecretKeySpec(toBytes(line[KEY_INDEX]), in testAeadEncryption()
168 byte[] iv = toBytes(line[IV_INDEX]); in testAeadEncryption()
169 byte[] plaintext = toBytes(line[PLAINTEXT_INDEX]); in testAeadEncryption()
170 byte[] ciphertext = toBytes(line[CIPHERTEXT_INDEX]); in testAeadEncryption()
171 byte[] tag = toBytes(line[TAG_INDEX]); in testAeadEncryption()
172 byte[] aad = toBytes(line[AAD_INDEX]); in testAeadEncryption()
[all …]
/external/protobuf/java/core/src/test/java/com/google/protobuf/
DMapForProto2LiteTest.java57 builder.getMutableInt32ToBytesField().put(1, TestUtil.toBytes("11")); in setMapValues()
58 builder.getMutableInt32ToBytesField().put(2, TestUtil.toBytes("22")); in setMapValues()
59 builder.getMutableInt32ToBytesField().put(3, TestUtil.toBytes("33")); in setMapValues()
99 assertEquals(TestUtil.toBytes("11"), message.getInt32ToBytesField().get(1)); in assertMapValuesSet()
100 assertEquals(TestUtil.toBytes("22"), message.getInt32ToBytesField().get(2)); in assertMapValuesSet()
101 assertEquals(TestUtil.toBytes("33"), message.getInt32ToBytesField().get(3)); in assertMapValuesSet()
128 builder.getMutableInt32ToBytesField().put(1, TestUtil.toBytes("111")); in updateMapValues()
130 builder.getMutableInt32ToBytesField().put(4, TestUtil.toBytes("44")); in updateMapValues()
159 assertEquals(TestUtil.toBytes("111"), message.getInt32ToBytesField().get(1)); in assertMapValuesUpdated()
160 assertEquals(TestUtil.toBytes("33"), message.getInt32ToBytesField().get(3)); in assertMapValuesUpdated()
[all …]
DTestUtilLite.java146 static ByteString toBytes(String str) { in toBytes() method in TestUtilLite
195 builder.setOptionalBytes (toBytes("116")); in setAllFields()
233 builder.addRepeatedBytes (toBytes("216")); in setAllFields()
268 builder.addRepeatedBytes (toBytes("316")); in setAllFields()
304 builder.setDefaultBytes (toBytes("416")); in setAllFields()
317 builder.setOneofBytes(toBytes("604")); in setAllFields()
360 message.setExtension(optionalBytesExtensionLite , toBytes("116")); in setAllExtensions()
398 message.addExtension(repeatedBytesExtensionLite , toBytes("216")); in setAllExtensions()
433 message.addExtension(repeatedBytesExtensionLite , toBytes("316")); in setAllExtensions()
469 message.setExtension(defaultBytesExtensionLite , toBytes("416")); in setAllExtensions()
[all …]
DMapForProto2Test.java60 builder.getMutableInt32ToBytesField().put(1, TestUtil.toBytes("11")); in setMapValues()
61 builder.getMutableInt32ToBytesField().put(2, TestUtil.toBytes("22")); in setMapValues()
62 builder.getMutableInt32ToBytesField().put(3, TestUtil.toBytes("33")); in setMapValues()
102 assertEquals(TestUtil.toBytes("11"), message.getInt32ToBytesField().get(1)); in assertMapValuesSet()
103 assertEquals(TestUtil.toBytes("22"), message.getInt32ToBytesField().get(2)); in assertMapValuesSet()
104 assertEquals(TestUtil.toBytes("33"), message.getInt32ToBytesField().get(3)); in assertMapValuesSet()
131 builder.getMutableInt32ToBytesField().put(1, TestUtil.toBytes("111")); in updateMapValues()
133 builder.getMutableInt32ToBytesField().put(4, TestUtil.toBytes("44")); in updateMapValues()
162 assertEquals(TestUtil.toBytes("111"), message.getInt32ToBytesField().get(1)); in assertMapValuesUpdated()
163 assertEquals(TestUtil.toBytes("33"), message.getInt32ToBytesField().get(3)); in assertMapValuesUpdated()
[all …]
DMapTest.java61 builder.getMutableInt32ToBytesField().put(1, TestUtil.toBytes("11")); in setMapValues()
62 builder.getMutableInt32ToBytesField().put(2, TestUtil.toBytes("22")); in setMapValues()
63 builder.getMutableInt32ToBytesField().put(3, TestUtil.toBytes("33")); in setMapValues()
103 assertEquals(TestUtil.toBytes("11"), message.getInt32ToBytesField().get(1)); in assertMapValuesSet()
104 assertEquals(TestUtil.toBytes("22"), message.getInt32ToBytesField().get(2)); in assertMapValuesSet()
105 assertEquals(TestUtil.toBytes("33"), message.getInt32ToBytesField().get(3)); in assertMapValuesSet()
132 builder.getMutableInt32ToBytesField().put(1, TestUtil.toBytes("111")); in updateMapValues()
134 builder.getMutableInt32ToBytesField().put(4, TestUtil.toBytes("44")); in updateMapValues()
163 assertEquals(TestUtil.toBytes("111"), message.getInt32ToBytesField().get(1)); in assertMapValuesUpdated()
164 assertEquals(TestUtil.toBytes("33"), message.getInt32ToBytesField().get(3)); in assertMapValuesUpdated()
[all …]
DTestUtil.java258 static ByteString toBytes(String str) { in toBytes() method in TestUtil
329 message.setOptionalBytes (toBytes("116")); in setAllFields()
367 message.addRepeatedBytes (toBytes("216")); in setAllFields()
402 message.addRepeatedBytes (toBytes("316")); in setAllFields()
438 message.setDefaultBytes (toBytes("416")); in setAllFields()
451 message.setOneofBytes(toBytes("604")); in setAllFields()
475 message.setRepeatedBytes (1, toBytes("516")); in modifyRepeatedFields()
550 Assert.assertEquals(toBytes("116"), message.getOptionalBytes()); in assertAllFieldsSet()
610 Assert.assertEquals(toBytes("216"), message.getRepeatedBytes(0)); in assertAllFieldsSet()
639 Assert.assertEquals(toBytes("316"), message.getRepeatedBytes(1)); in assertAllFieldsSet()
[all …]
DGeneratedMessageTest.java314 builder.addRepeatedBytes(TestUtil.toBytes("one")); in testRepeatedSettersRejectNull()
315 builder.addRepeatedBytes(TestUtil.toBytes("two")); in testRepeatedSettersRejectNull()
398 builder.addAllRepeatedBytes(Arrays.asList(TestUtil.toBytes("one"), null)); in testRepeatedAppendRejectsNull()
1291 message = builder.setFooBytes(TestUtil.toBytes("qux")).buildPartial(); in testSetOneofClearsOthers()
1353 assertEquals(message.getFooStringBytes(), TestUtil.toBytes("foo")); in testOneofTypes()
1359 assertEquals(message2.getFooStringBytes(), TestUtil.toBytes("")); in testOneofTypes()
1364 assertEquals(builder.getFooStringBytes(), TestUtil.toBytes("")); in testOneofTypes()
1369 assertEquals(message.getFooStringBytes(), TestUtil.toBytes("")); in testOneofTypes()
1383 assertEquals(message.getFooCordBytes(), TestUtil.toBytes("foo")); in testOneofTypes()
1389 assertEquals(message2.getFooCordBytes(), TestUtil.toBytes("")); in testOneofTypes()
[all …]
/external/capstone/bindings/vb6/
DForm1.frm165 code = toBytes(X86_CODE16)
169 code = toBytes(x86_code32)
173 code = toBytes(X86_CODE64)
178 code = toBytes(ARM_CODE)
183 code = toBytes(ARM64_CODE)
DmMisc.bas157 Public Function toBytes(ByVal hexstr, Optional strRet As Boolean = False) function
202 toBytes = StrConv(r, vbUnicode, LANG_US)
204 toBytes = r
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/
DBERConstructedOctetString.java19 static private byte[] toBytes( in toBytes() method in BERConstructedOctetString
59 super(toBytes(octs)); in BERConstructedOctetString()
DBEROctetString.java18 static private byte[] toBytes( in toBytes() method in BEROctetString
56 super(toBytes(octs)); in BEROctetString()
/external/glide/library/src/main/java/com/bumptech/glide/
DBitmapTypeRequest.java83 public BitmapRequestBuilder<ModelType, byte[]> toBytes() { in toBytes() method in BitmapTypeRequest
98 …public BitmapRequestBuilder<ModelType, byte[]> toBytes(Bitmap.CompressFormat compressFormat, int q… in toBytes() method in BitmapTypeRequest
DGifTypeRequest.java78 public GenericRequestBuilder<ModelType, InputStream, GifDrawable, byte[]> toBytes() { in toBytes() method in GifTypeRequest
/external/conscrypt/openjdk/src/test/java/org/conscrypt/
DNativeSslSessionTest.java453 byte[] sessionBytes = session.toBytes(); in check_reserializableFromByteArray_roundTrip()
457 byte[] sessionBytes2 = session2.toBytes(); in check_reserializableFromByteArray_roundTrip()
DMockSessionBuilder.java75 when(session.toBytes()).thenReturn(encodedBytes); in build()
/external/conscrypt/common/src/main/java/org/conscrypt/
DServerSessionContext.java78 byte[] data = session.toBytes(); in onBeforeAddSession()
DNativeSslSession.java201 abstract byte[] toBytes(); in toBytes() method in NativeSslSession
296 byte[] toBytes() { in toBytes() method in NativeSslSession.Impl
DClientSessionContext.java149 byte[] data = session.toBytes(); in onBeforeAddSession()
/external/icu/icu4j/tools/misc/src/com/ibm/icu/dev/tool/localeconverter/
DCalculateCRC32.java85 public byte [] toBytes() { in toBytes() method in CalculateCRC32
/external/deqp/framework/common/
DtcuRGBA.hpp88 …void toBytes (deUint8* bytes) const { bytes[0] = (deUint8)getRed(); bytes[1] = (deUint8)getGr… in toBytes() function in tcu::RGBA
/external/python/cpython2/Lib/
Durllib.py185 fullurl = unwrap(toBytes(fullurl))
233 url = unwrap(toBytes(url))
1057 def toBytes(url): function
Durllib2.py121 addinfourl, splitport, splittag, toBytes,
/external/python/cpython2/Lib/test/
Dtest_urllib.py979 result = urllib.toBytes(u'http://www.python.org')
981 self.assertRaises(UnicodeError, urllib.toBytes,