/external/python/cpython2/Lib/test/crashers/ |
buffer_mutate.py | 6 # underlying the buffer is mutated (here a bytearray object). 25 a = bytearray("test"*n)
|
/system/iot/attestation/partner-tools/ |
ec_helper.py | 64 pub_key = (c_ubyte * _ECDH_KEY_LEN).from_buffer(bytearray(_ECDH_KEY_LEN)) 72 private_key = bytes(bytearray(priv_key[:priv_key_len.value])) 73 public_key = bytes(bytearray(pub_key[0:_ECDH_KEY_LEN])) 98 shared_secret = (c_ubyte * 32).from_buffer(bytearray(32)) 108 return bytes(bytearray(shared_secret[0:32]))
|
/prebuilts/gdb/darwin-x86/lib/python2.7/test/ |
test_base64.py | 23 eq(base64.encodestring(bytearray('abc')), 'YWJj\n') 39 eq(base64.decodestring(bytearray("YWJj\n")), "abc") 83 eq(base64.b64encode(bytearray('abcd')), 'YWJjZA==') 85 '\xd3V\xbeo\xf7\x1d', altchars=bytearray('*$')) 99 eq(base64.standard_b64encode(bytearray('abcd')), 'YWJjZA==') 103 eq(base64.urlsafe_b64encode(bytearray('\xd3V\xbeo\xf7\x1d')), '01a-b_cd') 122 eq(base64.b64decode(bytearray("YWJj")), "abc") 136 eq(base64.standard_b64decode(bytearray("YWJj")), "abc") 140 eq(base64.urlsafe_b64decode(bytearray('01a-b_cd')), '\xd3V\xbeo\xf7\x1d') 155 eq(base64.b32encode(bytearray('abcd')), 'MFRGGZA=' [all...] |
test_bytes.py | 1 """Unit tests for the bytes and bytearray types. 225 # XXX Shouldn't bytes and bytearray agree on what to raise? 242 for f in bytes, bytearray: 259 b = bytearray([0x1a, 0x2b, 0x30]) 297 self.assertFalse(bytearray().endswith(b"anything")) 523 type2test = bytearray 526 self.assertRaises(TypeError, hash, bytearray()) 538 b = bytearray(20) 557 b = bytearray(b'hello') 560 b = bytearray(b'hello1') # test even number of item [all...] |
/prebuilts/gdb/linux-x86/lib/python2.7/test/ |
test_base64.py | 23 eq(base64.encodestring(bytearray('abc')), 'YWJj\n') 39 eq(base64.decodestring(bytearray("YWJj\n")), "abc") 83 eq(base64.b64encode(bytearray('abcd')), 'YWJjZA==') 85 '\xd3V\xbeo\xf7\x1d', altchars=bytearray('*$')) 99 eq(base64.standard_b64encode(bytearray('abcd')), 'YWJjZA==') 103 eq(base64.urlsafe_b64encode(bytearray('\xd3V\xbeo\xf7\x1d')), '01a-b_cd') 122 eq(base64.b64decode(bytearray("YWJj")), "abc") 136 eq(base64.standard_b64decode(bytearray("YWJj")), "abc") 140 eq(base64.urlsafe_b64decode(bytearray('01a-b_cd')), '\xd3V\xbeo\xf7\x1d') 155 eq(base64.b32encode(bytearray('abcd')), 'MFRGGZA=' [all...] |
test_bytes.py | 1 """Unit tests for the bytes and bytearray types. 225 # XXX Shouldn't bytes and bytearray agree on what to raise? 242 for f in bytes, bytearray: 259 b = bytearray([0x1a, 0x2b, 0x30]) 297 self.assertFalse(bytearray().endswith(b"anything")) 523 type2test = bytearray 526 self.assertRaises(TypeError, hash, bytearray()) 538 b = bytearray(20) 557 b = bytearray(b'hello') 560 b = bytearray(b'hello1') # test even number of item [all...] |
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/test/ |
test_base64.py | 23 eq(base64.encodestring(bytearray('abc')), 'YWJj\n') 39 eq(base64.decodestring(bytearray("YWJj\n")), "abc") 83 eq(base64.b64encode(bytearray('abcd')), 'YWJjZA==') 85 '\xd3V\xbeo\xf7\x1d', altchars=bytearray('*$')) 99 eq(base64.standard_b64encode(bytearray('abcd')), 'YWJjZA==') 103 eq(base64.urlsafe_b64encode(bytearray('\xd3V\xbeo\xf7\x1d')), '01a-b_cd') 122 eq(base64.b64decode(bytearray("YWJj")), "abc") 136 eq(base64.standard_b64decode(bytearray("YWJj")), "abc") 140 eq(base64.urlsafe_b64decode(bytearray('01a-b_cd')), '\xd3V\xbeo\xf7\x1d') 155 eq(base64.b32encode(bytearray('abcd')), 'MFRGGZA=' [all...] |
test_bytes.py | 1 """Unit tests for the bytes and bytearray types. 225 # XXX Shouldn't bytes and bytearray agree on what to raise? 242 for f in bytes, bytearray: 259 b = bytearray([0x1a, 0x2b, 0x30]) 297 self.assertFalse(bytearray().endswith(b"anything")) 523 type2test = bytearray 526 self.assertRaises(TypeError, hash, bytearray()) 538 b = bytearray(20) 557 b = bytearray(b'hello') 560 b = bytearray(b'hello1') # test even number of item [all...] |
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/test/ |
test_base64.py | 23 eq(base64.encodestring(bytearray('abc')), 'YWJj\n') 39 eq(base64.decodestring(bytearray("YWJj\n")), "abc") 83 eq(base64.b64encode(bytearray('abcd')), 'YWJjZA==') 85 '\xd3V\xbeo\xf7\x1d', altchars=bytearray('*$')) 99 eq(base64.standard_b64encode(bytearray('abcd')), 'YWJjZA==') 103 eq(base64.urlsafe_b64encode(bytearray('\xd3V\xbeo\xf7\x1d')), '01a-b_cd') 122 eq(base64.b64decode(bytearray("YWJj")), "abc") 136 eq(base64.standard_b64decode(bytearray("YWJj")), "abc") 140 eq(base64.urlsafe_b64decode(bytearray('01a-b_cd')), '\xd3V\xbeo\xf7\x1d') 155 eq(base64.b32encode(bytearray('abcd')), 'MFRGGZA=' [all...] |
test_bytes.py | 1 """Unit tests for the bytes and bytearray types. 225 # XXX Shouldn't bytes and bytearray agree on what to raise? 242 for f in bytes, bytearray: 259 b = bytearray([0x1a, 0x2b, 0x30]) 297 self.assertFalse(bytearray().endswith(b"anything")) 523 type2test = bytearray 526 self.assertRaises(TypeError, hash, bytearray()) 538 b = bytearray(20) 557 b = bytearray(b'hello') 560 b = bytearray(b'hello1') # test even number of item [all...] |
/external/flatbuffers/python/flatbuffers/ |
compat.py | 30 binary_types = (bytes,bytearray) 37 binary_types = (str,bytearray)
|
/external/pdfium/fxbarcode/pdf417/ |
BC_PDF417BarcodeMatrix.cpp | 59 std::vector<uint8_t> bytearray = m_matrix[0]->getScaledRow(xScale); local 60 size_t xMax = bytearray.size(); 67 bytearray = m_matrix[i / yScale]->getScaledRow(xScale); 70 m_matrixOut[k + l] = bytearray[l];
|
/external/python/cpython2/Lib/test/ |
test_bytes.py | 1 """Unit tests for the bytes and bytearray types. 223 # XXX Shouldn't bytes and bytearray agree on what to raise? 240 for f in bytes, bytearray: 257 b = bytearray([0x1a, 0x2b, 0x30]) 295 self.assertFalse(bytearray().endswith(b"anything")) 458 type2test = bytearray 461 self.assertRaises(TypeError, hash, bytearray()) 473 b = bytearray(20) 492 b = bytearray(b'hello') 495 b = bytearray(b'hello1') # test even number of item [all...] |
test_base64.py | 23 eq(base64.encodestring(bytearray('abc')), 'YWJj\n') 39 eq(base64.decodestring(bytearray("YWJj\n")), "abc") 83 eq(base64.b64encode(bytearray('abcd')), 'YWJjZA==') 85 '\xd3V\xbeo\xf7\x1d', altchars=bytearray('*$')) 99 eq(base64.standard_b64encode(bytearray('abcd')), 'YWJjZA==') 103 eq(base64.urlsafe_b64encode(bytearray('\xd3V\xbeo\xf7\x1d')), '01a-b_cd') 122 eq(base64.b64decode(bytearray("YWJj")), "abc") 136 eq(base64.standard_b64decode(bytearray("YWJj")), "abc") 140 eq(base64.urlsafe_b64decode(bytearray('01a-b_cd')), '\xd3V\xbeo\xf7\x1d') 176 eq(base64.b32encode(bytearray('abcd')), 'MFRGGZA=' [all...] |
test_getargs2.py | 527 self.assertRaises(TypeError, getargs_c, bytearray('a')) 538 self.assertRaises(TypeError, getargs_w, bytearray('bytes'), 3) 541 memoryview(bytearray('bytes')), 3) 545 buffer(bytearray('bytes')), 3) 552 self.assertRaises(TypeError, getargs_w_hash, bytearray('bytes')) 555 memoryview(bytearray('bytes'))) 559 buffer(bytearray('bytes'))) 568 buf = bytearray('bytearray') 570 self.assertEqual(buf, bytearray('[ytearra]') [all...] |
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/ |
test_bytes.py | 1 """Unit tests for the bytes and bytearray types.
225 # XXX Shouldn't bytes and bytearray agree on what to raise?
242 for f in bytes, bytearray:
259 b = bytearray([0x1a, 0x2b, 0x30])
297 self.assertFalse(bytearray().endswith(b"anything"))
523 type2test = bytearray
526 self.assertRaises(TypeError, hash, bytearray())
538 b = bytearray(20)
557 b = bytearray(b'hello')
560 b = bytearray(b'hello1') # test even number of items [all...] |
/external/python/cpython3/Lib/email/ |
base64mime.py | 51 def header_length(bytearray): 53 groups_of_3, leftover = divmod(len(bytearray), 3)
|
/external/autotest/client/common_lib/cros/ |
chip_utils.py | 77 h = bytearray(2) 103 h = bytearray(1)
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
decode_bmp_op_test.py | 59 byte_string = bytes(bytearray(encoded_bytes)) 134 byte_string = bytes(bytearray(encoded_bytes))
|
/external/avb/test/ |
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/cpython3/Lib/test/ |
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'' [all...] |
test_getargs2.py | 694 self.assertEqual(getargs_c(bytearray(b'a')), 97) 705 self.assertRaises(TypeError, getargs_y, bytearray(b'bytearray')) 714 self.assertEqual(getargs_y_star(bytearray(b'bytearray')), b'bytearray') 723 self.assertRaises(TypeError, getargs_y_hash, bytearray(b'bytearray')) 734 buf = bytearray(b'bytearray') [all...] |
test_bytes.py | 1 """Unit tests for the bytes and bytearray types. 143 bytearray(size - 4) 269 # XXX Shouldn't bytes and bytearray agree on what to raise? 289 for f in bytes, bytearray: 306 b = bytearray([0x1a, 0x2b, 0x30]) 335 self.assertEqual(bytearray([0x1a, 0x2b, 0x30]).hex(), '1a2b30') 351 self.assertEqual(dot_join([bytearray(b"ab"), b"cd"]), b"ab.:cd") 352 self.assertEqual(dot_join([b"ab", bytearray(b"cd")]), b"ab.:cd") 361 dot_join([bytearray(b"ab"), "cd", b"ef"]) 404 self.assertFalse(bytearray().endswith(b"anything") [all...] |
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Modules/ |
_randommodule.c | 458 unsigned char *bytearray;
local 471 bytearray = (unsigned char *)PyMem_Malloc(bytes);
472 if (bytearray == NULL) {
482 bytearray[i+0] = (unsigned char)r;
483 bytearray[i+1] = (unsigned char)(r >> 8);
484 bytearray[i+2] = (unsigned char)(r >> 16);
485 bytearray[i+3] = (unsigned char)(r >> 24);
488 /* little endian order to match bytearray assignment order */
489 result = _PyLong_FromByteArray(bytearray, bytes, 1, 0);
490 PyMem_Free(bytearray);
[all...] |
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Modules/ |
_randommodule.c | 443 unsigned char *bytearray;
local 456 bytearray = (unsigned char *)PyMem_Malloc(bytes);
457 if (bytearray == NULL) {
467 bytearray[i+0] = (unsigned char)r;
468 bytearray[i+1] = (unsigned char)(r >> 8);
469 bytearray[i+2] = (unsigned char)(r >> 16);
470 bytearray[i+3] = (unsigned char)(r >> 24);
473 /* little endian order to match bytearray assignment order */
474 result = _PyLong_FromByteArray(bytearray, bytes, 1, 0);
475 PyMem_Free(bytearray);
[all...] |