/system/gatekeeper/ |
D | gatekeeper_messages.cpp | 36 return sizeof(buf.length) + buf.length; in serialized_buffer_size() 40 memcpy(*buffer, &to_append->length, sizeof(to_append->length)); in append_to_buffer() 41 *buffer += sizeof(to_append->length); in append_to_buffer() 42 if (to_append->length != 0) { in append_to_buffer() 43 memcpy(*buffer, to_append->buffer.get(), to_append->length); in append_to_buffer() 44 *buffer += to_append->length; in append_to_buffer() 50 if (*buffer + sizeof(target->length) > end) return ERROR_INVALID; in read_from_buffer() 52 memcpy(&target->length, *buffer, sizeof(target->length)); in read_from_buffer() 53 *buffer += sizeof(target->length); in read_from_buffer() 54 if (target->length != 0) { in read_from_buffer() [all …]
|
/system/bt/osi/src/ |
D | ringbuffer.c | 66 size_t ringbuffer_insert(ringbuffer_t *rb, const uint8_t *p, size_t length) { in ringbuffer_insert() argument 70 if (length > ringbuffer_available(rb)) in ringbuffer_insert() 71 length = ringbuffer_available(rb); in ringbuffer_insert() 73 for (size_t i = 0; i != length; ++i) { in ringbuffer_insert() 79 rb->available -= length; in ringbuffer_insert() 80 return length; in ringbuffer_insert() 83 size_t ringbuffer_delete(ringbuffer_t *rb, size_t length) { in ringbuffer_delete() argument 86 if (length > ringbuffer_size(rb)) in ringbuffer_delete() 87 length = ringbuffer_size(rb); in ringbuffer_delete() 89 rb->head += length; in ringbuffer_delete() [all …]
|
D | buffer.c | 31 size_t length; member 46 buffer->length = size; in buffer_new() 53 return buffer_new_slice(buf, buf->length); in buffer_new_ref() 59 assert(slice_size <= buf->length); in buffer_new_slice() 69 ret->length = slice_size; in buffer_new_slice() 93 return buf->root->data + buf->root->length - buf->length; in buffer_ptr() 98 return buf->length; in buffer_length()
|
D | array.c | 31 size_t length; member 72 assert(index < array->length); in array_at() 78 return array->length; in array_length() 89 if (array->length == array->capacity && !grow(array)) { in array_append_ptr() 94 ++array->length; in array_append_ptr() 95 memcpy(array_at(array, array->length - 1), data, array->element_size); in array_append_ptr() 108 memcpy(new_data, array->internal_storage, array->length * array->element_size); in grow()
|
/system/extras/verity/ |
D | BootSignature.java | 70 private ASN1Integer length; field in BootSignature 81 public BootSignature(String target, int length) { in BootSignature() argument 84 this.length = new ASN1Integer(length); in BootSignature() 115 length = (ASN1Integer) attrs.getObjectAt(1); in BootSignature() 123 attrs.add(length); in getAuthenticatedAttributes() 156 byte[] signable = Arrays.copyOf(image, image.length + attrs.length); in generateSignableImage() 157 for (int i=0; i < attrs.length; i++) { in generateSignableImage() 158 signable[i+image.length] = attrs[i]; in generateSignableImage() 169 if (length.getValue().intValue() != image.length) { in verify() 206 int length = pageSize // include the page aligned image header in getSignableImageSize() local [all …]
|
D | verify_boot_signature.c | 45 ASN1_INTEGER *length; member 50 ASN1_SIMPLE(AuthAttrs, length, ASN1_INTEGER) 172 static int validate_signature_block(const BootSignature *bs, uint64_t length) in validate_signature_block() argument 203 length = htobe64(length); in validate_signature_block() 204 BN_bin2bn((const unsigned char *) &length, sizeof(length), &expected); in validate_signature_block() 206 ASN1_INTEGER_to_BN(bs->authenticatedAttributes->length, &value); in validate_signature_block() 230 static int hash_image(int fd, uint64_t length, const AuthAttrs *aa, in hash_image() argument 264 if ((length - total) < BUFFER_SIZE) { in hash_image() 265 bytes = length - total; in hash_image() 275 } while (total < length); in hash_image() [all …]
|
/system/core/toolbox/ |
D | ioctl.c | 68 int length = -1; in ioctl_main() local 87 length = xstrtoi(optarg, "length"); in ioctl_main() 129 length = 4; in ioctl_main() 132 if(length < 0) { in ioctl_main() 133 length = (argc - optind) * arg_size; in ioctl_main() 135 if(length) { in ioctl_main() 136 ioctl_args = calloc(1, length); in ioctl_main() 139 rem = length; in ioctl_main() 152 rem = length; in ioctl_main() 161 else if(length) in ioctl_main() [all …]
|
/system/gatekeeper/tests/ |
D | gatekeeper_messages_test.cpp | 37 result->length = size; in make_buffer() 56 msg.Serialize(serialized_msg.buffer.get(), serialized_msg.buffer.get() + serialized_msg.length); in TEST() 60 + serialized_msg.length); in TEST() 67 ASSERT_EQ((uint32_t) password_size, deserialized_password->length); in TEST() 69 ASSERT_EQ((uint32_t) 0, deserialized_msg.enrolled_password.length); in TEST() 71 ASSERT_EQ((uint32_t) 0, deserialized_msg.password_handle.length); in TEST() 85 msg.Serialize(serialized_msg.buffer.get(), serialized_msg.buffer.get() + serialized_msg.length); in TEST() 89 + serialized_msg.length); in TEST() 96 ASSERT_EQ((uint32_t) password_size, deserialized_password->length); in TEST() 98 ASSERT_EQ((uint32_t) 0, deserialized_msg.enrolled_password.length); in TEST() [all …]
|
/system/vold/ |
D | Process.cpp | 37 int length; in readSymLink() local 45 length = readlink(path, link, max- 1); in readSymLink() 46 if (length <= 0) in readSymLink() 48 link[length] = 0; in readSymLink() 53 int length = strlen(mountPoint); in pathMatchesMountPoint() local 54 if (length > 1 && strncmp(path, mountPoint, length) == 0) { in pathMatchesMountPoint() 56 if (mountPoint[length - 1] == '/') in pathMatchesMountPoint() 60 return (path[length] == 0 || path[length] == '/'); in pathMatchesMountPoint() 73 int length = read(fd, buffer, max - 1); in getProcessName() local 74 buffer[length] = 0; in getProcessName()
|
/system/bt/hci/src/ |
D | btsnoop_mem.c | 38 size_t length = 0; in btsnoop_mem_capture() local 43 length = data[2] + 4; in btsnoop_mem_capture() 48 length = data[1] + 3; in btsnoop_mem_capture() 59 if (length) in btsnoop_mem_capture() 60 (*data_callback)(type, data, length); in btsnoop_mem_capture()
|
D | hci_hal_mct.c | 46 static uint16_t transmit_data_on(int fd, uint8_t *data, uint16_t length); 143 static uint16_t transmit_data(serial_data_type_t type, uint8_t *data, uint16_t length) { in transmit_data() argument 145 return transmit_data_on(uart_fds[CH_ACL_OUT], data, length); in transmit_data() 147 return transmit_data_on(uart_fds[CH_CMD], data, length); in transmit_data() 156 static uint16_t transmit_data_on(int fd, uint8_t *data, uint16_t length) { in transmit_data_on() argument 158 assert(length > 0); in transmit_data_on() 161 while (length > 0) { in transmit_data_on() 162 ssize_t ret = write(fd, data + transmitted_length, length); in transmit_data_on() 173 length -= ret; in transmit_data_on()
|
D | btsnoop.c | 62 void btsnoop_net_write(const void *data, size_t length); 189 static void btsnoop_write(const void *data, size_t length) { in btsnoop_write() argument 191 write(logfile_fd, data, length); in btsnoop_write() 193 btsnoop_net_write(data, length); in btsnoop_write() 198 int length; in btsnoop_write_packet() local 224 length = htonl(length_he); in btsnoop_write_packet() 230 btsnoop_write(&length, 4); in btsnoop_write_packet() 231 btsnoop_write(&length, 4); in btsnoop_write_packet()
|
/system/core/libcutils/ |
D | uevent.c | 32 ssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length) in uevent_kernel_multicast_recv() argument 35 return uevent_kernel_multicast_uid_recv(socket, buffer, length, &uid); in uevent_kernel_multicast_recv() 47 ssize_t uevent_kernel_multicast_uid_recv(int socket, void *buffer, size_t length, uid_t *uid) in uevent_kernel_multicast_uid_recv() argument 49 return uevent_kernel_recv(socket, buffer, length, true, uid); in uevent_kernel_multicast_uid_recv() 52 ssize_t uevent_kernel_recv(int socket, void *buffer, size_t length, bool require_group, uid_t *uid) in uevent_kernel_recv() argument 54 struct iovec iov = { buffer, length }; in uevent_kernel_recv() 99 bzero(buffer, length); in uevent_kernel_recv()
|
/system/extras/ksmutils/ |
D | lookup3.c | 176 size_t length, /* the length of the key, in uint32_ts */ in hashword() argument 182 a = b = c = 0xdeadbeef + (((uint32_t)length)<<2) + initval; in hashword() 185 while (length > 3) in hashword() 191 length -= 3; in hashword() 196 switch(length) /* all the case statements fall through */ in hashword() 220 size_t length, /* the length of the key, in uint32_ts */ in hashword2() argument 227 a = b = c = 0xdeadbeef + ((uint32_t)(length<<2)) + *pc; in hashword2() 231 while (length > 3) in hashword2() 237 length -= 3; in hashword2() 242 switch(length) /* all the case statements fall through */ in hashword2() [all …]
|
/system/bt/osi/test/ |
D | eager_reader_test.cpp | 89 int length = strlen(data); in expect_data() local 91 for (int i = 0; i < length; i++) { in expect_data() 102 int length = strlen(data); in expect_data_multibyte() local 104 for (int i = 0; i < length;) { in expect_data_multibyte() 106 int bytes_to_read = (length - i) > 28 ? 28 : (length - i); in expect_data_multibyte() 109 for (int j = 0; j < bytes_read && i < length; j++, i++) { in expect_data_multibyte()
|
/system/bt/btif/src/ |
D | btif_debug_btsnoop.c | 45 static void btsnoop_cb(const uint16_t type, const uint8_t *data, const size_t length) { in btsnoop_cb() argument 50 while (ringbuffer_available(buffer) < (length + sizeof(btsnooz_header_t))) { in btsnoop_cb() 52 ringbuffer_delete(buffer, header.length - 1); in btsnoop_cb() 60 header.length = length; in btsnoop_cb() 65 ringbuffer_insert(buffer, data, length - 1); in btsnoop_cb() 94 const size_t length = BLOCK_SIZE - zs.avail_out; in btsnoop_compress() local 95 ringbuffer_insert(rb_dst, block_dst, length); in btsnoop_compress()
|
/system/gatekeeper/include/gatekeeper/ |
D | gatekeeper_messages.h | 41 length = 0; in SizedBuffer() 48 SizedBuffer(uint32_t length) { in SizedBuffer() 49 if (length != 0) { in SizedBuffer() 50 buffer.reset(new uint8_t[length]); in SizedBuffer() 54 this->length = length; in SizedBuffer() 64 length = len; in SizedBuffer() 68 uint32_t length; member
|
/system/core/libutils/ |
D | Tokenizer.cpp | 39 bool ownBuffer, size_t length) : in Tokenizer() argument 41 mBuffer(buffer), mOwnBuffer(ownBuffer), mLength(length), in Tokenizer() 66 size_t length = size_t(stat.st_size); in open() local 71 if (fileMap->create(NULL, fd, 0, length, true)) { in open() 81 buffer = new char[length]; in open() 83 ssize_t nrd = read(fd, buffer, length); in open() 90 length = size_t(nrd); in open() 95 *outTokenizer = new Tokenizer(filename, fileMap, buffer, ownBuffer, length); in open()
|
/system/core/gatekeeperd/tests/ |
D | gatekeeper_test.cpp | 40 password.length = 16; in do_enroll() 72 provided_password.length = 16; in TEST() 103 provided_password.length = 16; in TEST() 109 password_handle.buffer.reset(new uint8_t[enroll_response.enrolled_password_handle.length]); in TEST() 110 password_handle.length = enroll_response.enrolled_password_handle.length; in TEST() 112 password_handle.length); in TEST() 127 provided_password.length = 16; in TEST() 132 password.length = 16; in TEST() 140 password.length = 16; in TEST() 157 provided_password.length = 16; in TEST() [all …]
|
/system/bt/osi/include/ |
D | ringbuffer.h | 48 size_t ringbuffer_insert(ringbuffer_t *rb, const uint8_t *p, size_t length); 53 size_t ringbuffer_peek(const ringbuffer_t *rb, uint8_t *p, size_t length); 56 size_t ringbuffer_pop(ringbuffer_t *rb, uint8_t *p, size_t length); 60 size_t ringbuffer_delete(ringbuffer_t *rb, size_t length);
|
/system/keymaster/ |
D | android_keymaster_messages.cpp | 26 static void set_key_blob(keymaster_key_blob_t* key_blob, const void* key_material, size_t length) { in set_key_blob() argument 28 key_blob->key_material = dup_buffer(key_material, length); in set_key_blob() 29 key_blob->key_material_size = length; in set_key_blob() 98 void GetKeyCharacteristicsRequest::SetKeyMaterial(const void* key_material, size_t length) { in SetKeyMaterial() argument 99 set_key_blob(&key_blob, key_material, length); in SetKeyMaterial() 130 void BeginOperationRequest::SetKeyMaterial(const void* key_material, size_t length) { in SetKeyMaterial() argument 131 set_key_blob(&key_blob, key_material, length); in SetKeyMaterial() 282 void ImportKeyRequest::SetKeyMaterial(const void* key_material, size_t length) { in SetKeyMaterial() argument 284 key_data = dup_buffer(key_material, length); in SetKeyMaterial() 285 key_data_length = length; in SetKeyMaterial() [all …]
|
/system/core/include/cutils/ |
D | uevent.h | 28 ssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length); 29 ssize_t uevent_kernel_multicast_uid_recv(int socket, void *buffer, size_t length, uid_t *uid); 30 ssize_t uevent_kernel_recv(int socket, void *buffer, size_t length, bool require_group, uid_t *uid);
|
/system/core/gatekeeperd/ |
D | SoftGateKeeper.h | 60 uint32_t *length) const { in GetAuthTokenKey() argument 61 if (auth_token_key == NULL || length == NULL) return false; in GetAuthTokenKey() 66 *length = SIGNATURE_LENGTH_BYTES; in GetAuthTokenKey() 70 virtual void GetPasswordKey(const uint8_t **password_key, uint32_t *length) { in GetPasswordKey() argument 71 if (password_key == NULL || length == NULL) return; in GetPasswordKey() 76 *length = SIGNATURE_LENGTH_BYTES; in GetPasswordKey() 136 size_t digest_size = password.length + sizeof(salt); in ComputeFastHash() 139 memcpy(digest.get() + sizeof(salt), password.buffer.get(), password.length); in ComputeFastHash()
|
/system/core/base/ |
D | stringprintf.cpp | 53 int length = result + 1; in StringAppendV() local 54 char* buf = new char[length]; in StringAppendV() 58 result = vsnprintf(buf, length, format, backup_ap); in StringAppendV() 61 if (result >= 0 && result < length) { in StringAppendV()
|
/system/core/libziparchive/ |
D | entry_name_utils-inl.h | 25 inline bool IsValidEntryName(const uint8_t* entry_name, const size_t length) { in IsValidEntryName() argument 26 for (size_t i = 0; i < length; ++i) { in IsValidEntryName() 42 if (i == length) { in IsValidEntryName()
|