/external/python/cpython2/Doc/c-api/ |
D | bytearray.rst | 8 .. index:: object: bytearray 15 This subtype of :c:type:`PyObject` represents a Python bytearray object. 20 This instance of :c:type:`PyTypeObject` represents the Python bytearray type; 21 it is the same object as ``bytearray`` in the Python layer. 28 Return true if the object *o* is a bytearray object or an instance of a 29 subtype of the bytearray type. 34 Return true if the object *o* is a bytearray object, but not an instance of a 35 subtype of the bytearray type. 43 Return a new bytearray object from any object, *o*, that implements the 51 Create a new bytearray object from *string* and its length, *len*. On [all …]
|
/external/python/cpython3/Doc/c-api/ |
D | bytearray.rst | 8 .. index:: object: bytearray 13 This subtype of :c:type:`PyObject` represents a Python bytearray object. 18 This instance of :c:type:`PyTypeObject` represents the Python bytearray type; 19 it is the same object as :class:`bytearray` in the Python layer. 27 Return true if the object *o* is a bytearray object or an instance of a 28 subtype of the bytearray type. 33 Return true if the object *o* is a bytearray object, but not an instance of a 34 subtype of the bytearray type. 42 Return a new bytearray object from any object, *o*, that implements the 50 Create a new bytearray object from *string* and its length, *len*. On [all …]
|
/external/python/cpython2/Lib/test/ |
D | test_bytes.py | 240 for f in bytes, bytearray: 257 b = bytearray([0x1a, 0x2b, 0x30]) 295 self.assertFalse(bytearray().endswith(b"anything")) 481 type2test = bytearray 484 self.assertRaises(TypeError, hash, bytearray()) 496 b = bytearray(20) 515 b = bytearray(b'hello') 518 b = bytearray(b'hello1') # test even number of items 521 b = bytearray() 527 return bytearray(map(ord, s)) [all …]
|
D | test_base64.py | 22 eq(base64.encodestring(bytearray('abc')), 'YWJj\n') 38 eq(base64.decodestring(bytearray("YWJj\n")), "abc") 81 eq(base64.b64encode(bytearray('abcd')), 'YWJjZA==') 83 '\xd3V\xbeo\xf7\x1d', altchars=bytearray('*$')) 97 eq(base64.standard_b64encode(bytearray('abcd')), 'YWJjZA==') 101 eq(base64.urlsafe_b64encode(bytearray('\xd3V\xbeo\xf7\x1d')), '01a-b_cd') 120 eq(base64.b64decode(bytearray("YWJj")), "abc") 134 eq(base64.standard_b64decode(bytearray("YWJj")), "abc") 138 eq(base64.urlsafe_b64decode(bytearray('01a-b_cd')), '\xd3V\xbeo\xf7\x1d') 174 eq(base64.b32encode(bytearray('abcd')), 'MFRGGZA=') [all …]
|
D | test_getargs2.py | 528 self.assertRaises(TypeError, getargs_c, bytearray('a')) 539 self.assertRaises(TypeError, getargs_w, bytearray('bytes'), 3) 542 memoryview(bytearray('bytes')), 3) 546 buffer(bytearray('bytes')), 3) 553 self.assertRaises(TypeError, getargs_w_hash, bytearray('bytes')) 556 memoryview(bytearray('bytes'))) 560 buffer(bytearray('bytes'))) 569 buf = bytearray('bytearray') 571 self.assertEqual(buf, bytearray('[ytearra]')) 572 buf = bytearray(b'memoryview') [all …]
|
D | test_hmac.py | 342 a, b = bytearray(b"foobar"), bytearray(b"foobar") 346 a, b = bytearray(b"foobar"), bytearray(b"foo") 350 a, b = bytearray(b"foobar"), bytearray(b"foobaz") 354 a, b = bytearray(b"foobar"), b"foobar" 359 a, b = bytearray(b"foobar"), b"foo" 364 a, b = bytearray(b"foobar"), b"foobaz"
|
/external/python/cpython3/Lib/test/ |
D | test_bytes.py | 202 bytearray(size - 4) 362 for f in bytes, bytearray: 379 b = bytearray([0x1a, 0x2b, 0x30]) 416 self.assertEqual(bytearray([0x1a, 0x2b, 0x30]).hex(), '1a2b30') 489 self.assertEqual(dot_join([bytearray(b"ab"), b"cd"]), b"ab.:cd") 490 self.assertEqual(dot_join([b"ab", bytearray(b"cd")]), b"ab.:cd") 499 dot_join([bytearray(b"ab"), "cd", b"ef"]) 542 self.assertFalse(bytearray().endswith(b"anything")) 766 for fill_type in (bytes, bytearray): 773 for fill_type in (bytes, bytearray): [all …]
|
D | test_getargs2.py | 802 self.assertEqual(getargs_c(bytearray(b'a')), 97) 813 self.assertRaises(TypeError, getargs_y, bytearray(b'bytearray')) 822 self.assertEqual(getargs_y_star(bytearray(b'bytearray')), b'bytearray') 831 self.assertRaises(TypeError, getargs_y_hash, bytearray(b'bytearray')) 842 buf = bytearray(b'bytearray') 844 self.assertEqual(buf, bytearray(b'[ytearra]')) 845 buf = bytearray(b'memoryview') 847 self.assertEqual(buf, bytearray(b'[emoryvie]')) 859 self.assertRaises(TypeError, getargs_C, bytearray(b'a')) 869 self.assertRaises(TypeError, getargs_s, bytearray(b'bytearray')) [all …]
|
D | test_audioop.py | 37 self.assertEqual(audioop.max(bytearray(), w), 0) 50 self.assertEqual(audioop.minmax(bytearray(), w), 67 self.assertEqual(audioop.maxpp(bytearray(), w), 0) 77 self.assertEqual(audioop.avg(bytearray(), w), 0) 95 self.assertEqual(audioop.avgpp(bytearray(), w), 0) 107 self.assertEqual(audioop.rms(bytearray(), w), 0) 123 self.assertEqual(audioop.cross(bytearray(), w), -1) 135 self.assertEqual(audioop.add(bytearray(), bytearray(), w), b'') 154 self.assertEqual(audioop.bias(bytearray(), w, bias), b'') 199 self.assertEqual(audioop.lin2lin(bytearray(datas[w]), w, w), [all …]
|
D | test_hmac.py | 366 h = hmac.HMAC(bytearray(b"key"), bytearray(b"hash this!"), 476 a, b = bytearray(b"foobar"), bytearray(b"foobar") 480 a, b = bytearray(b"foobar"), bytearray(b"foo") 484 a, b = bytearray(b"foobar"), bytearray(b"foobaz") 488 a, b = bytearray(b"foobar"), b"foobar" 493 a, b = bytearray(b"foobar"), b"foo" 498 a, b = bytearray(b"foobar"), b"foobaz"
|
D | test_codeccallbacks.py | 40 UnicodeDecodeError.__init__(self, "ascii", bytearray(b""), 0, 1, "bad") 46 UnicodeDecodeError.__init__(self, "ascii", bytearray(b""), 0, 1, "bad") 350 ["ascii", bytearray(b"g\xfcrk"), 1, 2, "ouch"], 355 ["ascii", bytearray(b"g\xfcrk"), 1, 3, "ouch"], 409 UnicodeDecodeError("ascii", bytearray(b"\xff"), 0, 1, "ouch") 438 UnicodeDecodeError("ascii", bytearray(b"a\xffb"), 1, 2, "ouch")), 478 UnicodeDecodeError("ascii", bytearray(b"a\xffb"), 1, 2, "ouch")), 504 UnicodeDecodeError("ascii", bytearray(b"\xff"), 0, 1, "ouch") 577 UnicodeDecodeError("ascii", bytearray(b"a" + b + b"b"), 599 UnicodeDecodeError("ascii", bytearray(b"\xff"), 0, 1, "ouch") [all …]
|
/external/python/cryptography/tests/hazmat/primitives/ |
D | test_aes.py | 460 data = bytearray(b"helloworld") 462 algorithms.AES(bytearray(b"\x00" * 16)), 463 modes.GCM(bytearray(b"\x00" * 12)), 466 enc.authenticate_additional_data(bytearray(b"foo")) 469 algorithms.AES(bytearray(b"\x00" * 16)), 470 modes.GCM(bytearray(b"\x00" * 12), enc.tag), 473 dec.authenticate_additional_data(bytearray(b"foo")) 481 modes.CBC(bytearray(b"\x00" * 16)), 482 modes.CTR(bytearray(b"\x00" * 16)), 483 modes.OFB(bytearray(b"\x00" * 16)), [all …]
|
D | test_chacha20.py | 48 key = bytearray(os.urandom(32)) 49 nonce = bytearray(os.urandom(16)) 54 ct = enc.update(bytearray(b"hello")) + enc.finalize()
|
D | test_aead.py | 179 chacha2 = ChaCha20Poly1305(bytearray(key)) 180 ct2 = chacha2.encrypt(bytearray(nonce), pt, ad) 182 computed_pt2 = chacha2.decrypt(bytearray(nonce), ct2, ad) 344 aesccm2 = AESCCM(bytearray(key)) 345 ct2 = aesccm2.encrypt(bytearray(nonce), pt, ad) 347 computed_pt2 = aesccm2.decrypt(bytearray(nonce), ct2, ad) 456 aesgcm2 = AESGCM(bytearray(key)) 457 ct2 = aesgcm2.encrypt(bytearray(nonce), pt, ad) 459 computed_pt2 = aesgcm2.decrypt(bytearray(nonce), ct2, ad)
|
/external/mesa3d/src/vulkan/overlay-layer/ |
D | mesa-overlay-control.py | 13 VERSION_HEADER = bytearray('MesaOverlayControlVersion', 'utf-8') 14 DEVICE_NAME_HEADER = bytearray('DeviceName', 'utf-8') 15 MESA_VERSION_HEADER = bytearray('MesaVersion', 'utf-8') 80 self.cmd = bytearray(4096) 81 self.param = bytearray(4096) 188 conn.send(bytearray(':capture=1;', 'utf-8')) 190 conn.send(bytearray(':capture=0;', 'utf-8'))
|
/external/python/cpython3/Lib/ctypes/test/ |
D | test_frombuffer.py | 46 (c_char * 16).from_buffer(memoryview(bytearray(b"a" * 16))[::-1]) 80 a = [c_char.from_buffer(memoryview(bytearray(b'a')))] 126 self.assertRaises(TypeError, Array.from_buffer, bytearray(10)) 127 self.assertRaises(TypeError, Structure.from_buffer, bytearray(10)) 128 self.assertRaises(TypeError, Union.from_buffer, bytearray(10)) 129 self.assertRaises(TypeError, _CFuncPtr.from_buffer, bytearray(10)) 130 self.assertRaises(TypeError, _Pointer.from_buffer, bytearray(10)) 131 self.assertRaises(TypeError, _SimpleCData.from_buffer, bytearray(10))
|
/external/python/cpython2/Lib/ctypes/test/ |
D | test_frombuffer.py | 83 self.assertRaises(TypeError, Array.from_buffer, bytearray(10)) 84 self.assertRaises(TypeError, Structure.from_buffer, bytearray(10)) 85 self.assertRaises(TypeError, Union.from_buffer, bytearray(10)) 86 self.assertRaises(TypeError, _CFuncPtr.from_buffer, bytearray(10)) 87 self.assertRaises(TypeError, _Pointer.from_buffer, bytearray(10)) 88 self.assertRaises(TypeError, _SimpleCData.from_buffer, bytearray(10))
|
/external/avb/test/ |
D | image_handler_unittest.py | 123 self.assertEqual(ih.read(14), bytearray('Barfoo43Barfoo')) 125 self.assertEqual(ih.read(2), bytearray('43')) 130 self.assertEqual(ih.read(4), bytearray('\x02\x03\x04\x01')) 134 self.assertEqual(ih.read(12), bytearray('43Barfoo43\x00\x00')) 136 self.assertEqual(ih.read(5), bytearray('\x02\x03\x04Fo')) 140 self.assertEqual(ih.read(16), bytearray('\x00\x00'))
|
/external/python/cpython2/Modules/ |
D | _randommodule.c | 471 unsigned char *bytearray; in random_getrandbits() local 484 bytearray = (unsigned char *)PyMem_Malloc(bytes); in random_getrandbits() 485 if (bytearray == NULL) { in random_getrandbits() 495 bytearray[i+0] = (unsigned char)r; in random_getrandbits() 496 bytearray[i+1] = (unsigned char)(r >> 8); in random_getrandbits() 497 bytearray[i+2] = (unsigned char)(r >> 16); in random_getrandbits() 498 bytearray[i+3] = (unsigned char)(r >> 24); in random_getrandbits() 502 result = _PyLong_FromByteArray(bytearray, bytes, 1, 0); in random_getrandbits() 503 PyMem_Free(bytearray); in random_getrandbits()
|
/external/chromium-trace/catapult/third_party/pyserial/serial/ |
D | serialutil.py | 11 bytearray 19 class bytearray(list): class 36 return bytearray(list.__getslice__(self, i, j)) 40 return bytearray(list.__getitem__(self, item)) 46 other = bytearray(other) 69 elif isinstance(seq, bytearray): 74 b = bytearray() 166 line = bytearray()
|
/external/python/cpython3/Lib/email/ |
D | quoprimime.py | 84 def header_length(bytearray): argument 94 return sum(len(_QUOPRI_HEADER_MAP[octet]) for octet in bytearray) 97 def body_length(bytearray): argument 104 return sum(len(_QUOPRI_BODY_MAP[octet]) for octet in bytearray)
|
/external/bcc/examples/networking/dns_matching/ |
D | dns_matching.py | 17 b = bytearray() 35 leaf.p = (c_ubyte * 4).from_buffer(bytearray(4)) 86 packet_bytearray = bytearray(packet_str)
|
/external/avb/ |
D | aftltool_test.py | 86 self.test_sth_1.root_hash = bytearray('f' * 32) 90 self.test_sth_1_bytes = bytearray( 103 self.test_proof_hashes_1.append(bytearray('b' * 32)) 104 self.test_proof_hashes_1.append(bytearray('c' * 32)) 105 self.test_proof_hashes_1.append(bytearray('d' * 32)) 106 self.test_proof_hashes_1.append(bytearray('e' * 32)) 116 self.test_entry_1_bytes = bytearray( 138 self.test_sth_2.root_hash = bytearray('e' * 32) 144 self.test_sth_2_bytes = bytearray( 157 self.test_proof_hashes_2.append(bytearray('g' * 32)) [all …]
|
/external/pdfium/fxbarcode/pdf417/ |
D | BC_PDF417BarcodeMatrix.cpp | 39 std::vector<uint8_t>& bytearray = m_matrix[i]->getRow(); in toBitArray() local 41 bitArray[i * m_width + j] = bytearray[j]; in toBitArray()
|
/external/flatbuffers/python/flatbuffers/ |
D | compat.py | 30 binary_types = (bytes,bytearray) 37 binary_types = (str,bytearray)
|