Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 227) sorted by relevance

12345678910

/openthread-3.7.0/third_party/mbedtls/repo/tests/suites/
Dtest_suite_common.data1 Block xor, length 0
4 Block xor, length 1
7 Block xor, length 3
10 Block xor, length 4
13 Block xor, length 7
16 Block xor, length 8
19 Block xor, length 16
22 Block xor, length 64
25 Block xor, length 256
28 Block xor, length 257
[all …]
Dtest_suite_asn1parse.data1 Empty length
4 Incomplete length
7 Prefixes of OCTET STRING, length=0
10 Prefixes of OCTET STRING, length=0 (0 length bytes)
13 Prefixes of OCTET STRING, length=1
16 Prefixes of OCTET STRING, length=2
19 Prefixes of BOOLEAN, length=0
22 Prefixes of BOOLEAN, length=1
25 Prefixes of BOOLEAN, length=2
28 Prefixes of INTEGER, length=1
[all …]
Dtest_suite_pkcs7.data169 PKCS7 Parse Failure Invalid ASN1: Change length from 1280 to 1281 #23.0
181 PKCS7 Parse Failure Invalid ASN1: Change length from 9 to 10 #26.0
185 PKCS7 Parse Failure Invalid ASN1: Change length from 9 to 8 #27.0
193 PKCS7 Parse Failure Invalid ASN1: Change length from 1265 to 1266 #29.0
201 PKCS7 Parse Failure Invalid ASN1: Change length from 1265 to 1264 #31.0
209 PKCS7 Parse Failure Invalid ASN1: Change length from 1261 to 1262 #33.0
217 PKCS7 Parse Failure Invalid ASN1: Change length from 1261 to 1260 #35.0
225 PKCS7 Parse Failure Invalid ASN1: Change length from 1 to 2 #37.0
229 PKCS7 Parse Failure Invalid ASN1: Change length from 1 to 0 #38.0
237 PKCS7 Parse Failure Invalid ASN1: Change length from 15 to 16 #40.0
[all …]
Dtest_suite_psa_crypto_low_hash.function32 size_t length = SIZE_MAX;
37 output, output_size, &length),
39 ASSERT_COMPARE(expected->x, expected->len, output, length);
47 output, output_size, &length),
49 ASSERT_COMPARE(expected->x, expected->len, output, length);
70 size_t length = SIZE_MAX;
97 output, output_size, &length),
99 ASSERT_COMPARE(expected2->x, expected2->len, output, length);
106 output, output_size, &length),
108 ASSERT_COMPARE(expected1->x, expected1->len, output, length);
[all …]
Dtest_suite_psa_crypto_metadata.function197 size_t length)
212 TEST_EQUAL(length, PSA_MAC_LENGTH(key_type, key_bits, alg));
237 /* Tag length */
254 size_t length = length_arg;
288 /* Hash length */
289 TEST_EQUAL(length, PSA_HASH_LENGTH(alg));
290 TEST_ASSERT(length <= PSA_HASH_MAX_SIZE);
300 size_t length = length_arg;
306 key_type, key_bits, length);
308 TEST_ASSERT(length <= PSA_MAC_MAX_SIZE);
[all …]
Dtest_suite_asn1write.data139 ASN.1 Write OCTET STRING: length=0
142 ASN.1 Write OCTET STRING: length=1
145 ASN.1 Write OCTET STRING: length=2
148 ASN.1 Write OCTET STRING: length=127
151 ASN.1 Write OCTET STRING: length=128
154 ASN.1 Write OCTET STRING: length=255
157 ASN.1 Write OCTET STRING: length=256
160 ASN.1 Write UTF8 STRING: length=0
163 ASN.1 Write UTF8 STRING: length=1
166 ASN.1 Write UTF8 STRING: length=128
[all …]
Dtest_suite_psa_crypto_memory.function105 local_input.buffer, local_input.length);
120 local_input.length = input_len;
121 TEST_CALLOC(local_input.buffer, local_input.length);
126 TEST_EQUAL(local_input.length, 0);
131 local_input.length = 0;
148 TEST_MEMORY_COMPARE(local_input.buffer, local_input.length,
154 TEST_EQUAL(local_input.length, 0);
174 TEST_EQUAL(local_output.length, output_len);
181 local_output.length = 0;
201 local_output.length = output_len;
[all …]
Dtest_suite_ecjpake.data25 ECJPAKE round one: KKP1: length of first point too small
28 ECJPAKE round one: KKP1: length of first point too big
43 ECJPAKE round one: KKP1: length of second point too small
46 ECJPAKE round one: KKP1: length of second point too big
58 ECJPAKE round one: KKP1: zero-length r
73 ECJPAKE round one: KKP2: length of first point too small
76 ECJPAKE round one: KKP2: length of first point too big
91 ECJPAKE round one: KKP2: length of second point too small
94 ECJPAKE round one: KKP2: length of second point too big
106 ECJPAKE round one: KKP2: zero-length r
[all …]
/openthread-3.7.0/tests/unit/
Dtest_message.cpp106 for (uint16_t length = 0; length <= kMaxSize - offset; length++) in TestMessage() local
108 for (uint16_t i = 0; i < length; i++) in TestMessage()
113 message->WriteBytes(offset, &writeBuffer[offset], length); in TestMessage()
120 SuccessOrQuit(message->Read(offset, readBuffer, length)); in TestMessage()
121 VerifyOrQuit(memcmp(readBuffer, &writeBuffer[offset], length) == 0); in TestMessage()
122 …VerifyOrQuit(memcmp(&readBuffer[length], zeroBuffer, kMaxSize - length) == 0, "read after length"); in TestMessage()
124 VerifyOrQuit(message->CompareBytes(offset, &writeBuffer[offset], length)); in TestMessage()
126 if (length == 0) in TestMessage()
135 VerifyOrQuit(!message->CompareBytes(offset, &writeBuffer[offset], length)); in TestMessage()
138 writeBuffer[offset + length - 1]++; in TestMessage()
[all …]
Dtest_flash.cpp67 uint16_t length = key; in TestFlash() local
69 SuccessOrQuit(flash.Add(key, writeBuffer, length)); in TestFlash()
74 uint16_t length = key; in TestFlash() local
76 SuccessOrQuit(flash.Get(key, 0, readBuffer, &length)); in TestFlash()
77 VerifyOrQuit(length == key, "Get() did not return expected length"); in TestFlash()
78 … VerifyOrQuit(memcmp(readBuffer, writeBuffer, length) == 0, "Get() did not return expected value"); in TestFlash()
96 uint16_t length = index; in TestFlash() local
98 SuccessOrQuit(flash.Add(0, writeBuffer, length)); in TestFlash()
103 uint16_t length = index; in TestFlash() local
105 SuccessOrQuit(flash.Get(0, index, readBuffer, &length)); in TestFlash()
[all …]
Dtest_hdlc.cpp132 uint16_t length; in TestSpinelMultiFrameBuffer() local
143 …VerifyOrQuit(frameBuffer.GetNextSavedFrame(frame, length) == OT_ERROR_NOT_FOUND, "after constructo… in TestSpinelMultiFrameBuffer()
204 SuccessOrQuit(frameBuffer.GetNextSavedFrame(frame, length)); in TestSpinelMultiFrameBuffer()
205 VerifyOrQuit(length == sizeof(sMottoText) - 1, "GetNextSavedFrame() length is incorrect"); in TestSpinelMultiFrameBuffer()
206 …VerifyOrQuit(memcmp(frame, sMottoText, length) == 0, "GetNextSavedFrame() frame content is incorre… in TestSpinelMultiFrameBuffer()
209 SuccessOrQuit(frameBuffer.GetNextSavedFrame(frame, length)); in TestSpinelMultiFrameBuffer()
210 VerifyOrQuit(length == sizeof(sHelloText) - 1, "GetNextSavedFrame() length is incorrect"); in TestSpinelMultiFrameBuffer()
211 …VerifyOrQuit(memcmp(frame, sHelloText, length) == 0, "GetNextSavedFrame() frame content is incorre… in TestSpinelMultiFrameBuffer()
214 SuccessOrQuit(frameBuffer.GetNextSavedFrame(frame, length)); in TestSpinelMultiFrameBuffer()
215 VerifyOrQuit(length == sizeof(sHexText) - 1, "GetNextSavedFrame() length is incorrect"); in TestSpinelMultiFrameBuffer()
[all …]
Dtest_tlv.cpp49 uint16_t length; in TestTlv() local
60 …VerifyOrQuit(Tlv::FindTlvValueOffset(*message, /* aType */ 1, valueOffset, length) == kErrorNotFou… in TestTlv()
71 SuccessOrQuit(Tlv::FindTlvValueOffset(*message, /* aType */ 1, valueOffset, length)); in TestTlv()
73 VerifyOrQuit(length == 0); in TestTlv()
85 SuccessOrQuit(Tlv::FindTlvValueOffset(*message, /* aType */ 2, valueOffset, length)); in TestTlv()
87 VerifyOrQuit(length == 0); in TestTlv()
100 SuccessOrQuit(Tlv::FindTlvValueOffset(*message, /* aType */ 3, valueOffset, length)); in TestTlv()
102 VerifyOrQuit(length == 1); in TestTlv()
117 SuccessOrQuit(Tlv::FindTlvValueOffset(*message, /* aType */ 4, valueOffset, length)); in TestTlv()
119 VerifyOrQuit(length == 2); in TestTlv()
[all …]
Dtest_lowpan.cpp1869 uint16_t length; in TestLowpanMeshHeader() local
1881 length = frameBuilder.GetLength(); in TestLowpanMeshHeader()
1882 VerifyOrQuit(length == meshHeader.GetHeaderLength()); in TestLowpanMeshHeader()
1883 …VerifyOrQuit(length == sizeof(kMeshHeader1), "MeshHeader::AppendTo() returned length is incorrect"… in TestLowpanMeshHeader()
1884 VerifyOrQuit(memcmp(frame, kMeshHeader1, length) == 0, "MeshHeader::AppendTo() failed"); in TestLowpanMeshHeader()
1887 frameData.Init(frame, length); in TestLowpanMeshHeader()
1891 …VerifyOrQuit(frameData.GetBytes() - frame == length, "ParseFrom() did not skip over parsed content… in TestLowpanMeshHeader()
1896 frameData.Init(frame, length - 1); in TestLowpanMeshHeader()
1909 length = frameBuilder.GetLength(); in TestLowpanMeshHeader()
1910 …VerifyOrQuit(length == sizeof(kMeshHeader2), "MeshHeader::AppendTo() returned length is incorrect"… in TestLowpanMeshHeader()
[all …]
/openthread-3.7.0/src/posix/platform/
Dsettings.cpp199 uint16_t length; in otPlatSettingsInit() local
205 rval = read(sSettingsFd, &length, sizeof(length)); in otPlatSettingsInit()
206 VerifyOrExit(rval == sizeof(length), error = OT_ERROR_PARSE); in otPlatSettingsInit()
208 offset += sizeof(key) + sizeof(length) + length; in otPlatSettingsInit()
209 VerifyOrExit(offset == lseek(sSettingsFd, length, SEEK_CUR), error = OT_ERROR_PARSE); in otPlatSettingsInit()
345 uint16_t length; in PlatformSettingsGet() local
351 rval = read(sSettingsFd, &length, sizeof(length)); in PlatformSettingsGet()
352 VerifyOrExit(rval == sizeof(length), error = OT_ERROR_PARSE); in PlatformSettingsGet()
364 uint16_t readLength = (length <= *aValueLength ? length : *aValueLength); in PlatformSettingsGet()
369 *aValueLength = length; in PlatformSettingsGet()
[all …]
Dmdns_socket.cpp246 uint16_t length; in SendMulticast() local
251 length = otMessageGetLength(aMessage); in SendMulticast()
253 if (length > kMaxMessageLength) in SendMulticast()
255 LogWarn("Multicast msg length %u is longer than max %u", length, kMaxMessageLength); in SendMulticast()
283 uint16_t length; in SendUnicast() local
288 length = otMessageGetLength(aMessage); in SendUnicast()
290 if (length > kMaxMessageLength) in SendUnicast()
292 LogWarn("Unicast msg length %u is longer than max %u", length, kMaxMessageLength); in SendUnicast()
362 uint16_t length; in SendQueuedMessages() local
370 length = otMessageGetLength(message); in SendQueuedMessages()
[all …]
Dpower.cpp39 uint16_t length = static_cast<uint16_t>(strlen(aDomain)); in Set() local
41 VerifyOrExit(length <= kDomainSize, error = OT_ERROR_INVALID_ARGS); in Set()
42 memcpy(m8, aDomain, length); in Set()
43 m8[length] = '\0'; in Set()
80 uint16_t length = sizeof(mData); in Set() local
82 …SuccessOrExit(error = ot::Utils::CmdLineParser::ParseAsHexString(aRawPowerSetting, length, mData)); in Set()
83 mLength = static_cast<uint8_t>(length); in Set()
/openthread-3.7.0/examples/platforms/utils/
Dlogging_rtt.c145 uint16_t length = 0; in utilsLogRttOutput() local
152 length += logTimestamp(logString, LOG_PARSE_BUFFER_SIZE); in utilsLogRttOutput()
156 length += logLevel(&logString[length], (LOG_PARSE_BUFFER_SIZE - length), aLogLevel); in utilsLogRttOutput()
158 …charsWritten = vsnprintf(&logString[length], (size_t)(LOG_PARSE_BUFFER_SIZE - length), aFormat, ap… in utilsLogRttOutput()
160 length += charsWritten; in utilsLogRttOutput()
162 if (length > LOG_PARSE_BUFFER_SIZE) in utilsLogRttOutput()
164 length = LOG_PARSE_BUFFER_SIZE; in utilsLogRttOutput()
167 logString[length++] = '\n'; in utilsLogRttOutput()
170 SEGGER_RTT_WriteNoLock(LOG_RTT_BUFFER_INDEX, logString, length); in utilsLogRttOutput()
/openthread-3.7.0/third_party/mbedtls/repo/programs/psa/
Dpsa_constant_names.c45 const char *string, size_t length) in append() argument
47 *required_size += length; in append()
49 memcpy(*buffer, string, length); in append()
50 *buffer += length; in append()
73 const char *string, size_t length, in append_with_curve() argument
77 append(buffer, buffer_size, required_size, string, length); in append_with_curve()
91 const char *string, size_t length, in append_with_group() argument
95 append(buffer, buffer_size, required_size, string, length); in append_with_group()
133 size_t length = strlen(name); in psa_snprint_status() local
134 if (length < buffer_size) { in psa_snprint_status()
[all …]
/openthread-3.7.0/tools/tcat_ble_client/dataset/
Ddataset_entries.py30 self.length = None
61 self.length = 8 # spec defined
79 tlv = struct.pack('>BBQ', self.type.value, self.length, value)
87 self.length = 8 # spec defined
105 tlv = struct.pack('>BBQ', self.type.value, self.length, value)
113 self.length = 16 # spec defined
122 if len(nk) != self.length * 2: # need length * 2 hex characters
130 if len(self.data) != self.length * 2: # need length * 2 hex characters
133 tlv = struct.pack('>BB', self.type.value, self.length) + value
166 self.length = 8 # spec defined
[all …]
/openthread-3.7.0/third_party/mbedtls/repo/tests/scripts/
Dgenerate_pkcs7_tests.py113 length = int(''.join(data[leng_i + 1: data_i]), 16)
115 length = int(data[leng_i], 16)
119 ", length = " + str(length)+ ":")
120 print(''.join(data[data_i:data_i+length]))
138 reasons.append("Change length from " + str(length) + " to " \
139 + str(length + 1))
144 data[data_i:data_i + length] + ["00"] + \
145 data[data_i + length:])
154 reasons.append("Change length from " + str(length) + " to " + str(length - 1))
160 i = data_i + length
/openthread-3.7.0/src/cli/
Dcli_commissioner.cpp315 uint8_t length = 0; in Process() local
319 VerifyOrExit(static_cast<size_t>(length) < sizeof(tlvs), error = OT_ERROR_NO_BUFS); in Process()
323 tlvs[length++] = OT_MESHCOP_TLV_BORDER_AGENT_RLOC; in Process()
327 tlvs[length++] = OT_MESHCOP_TLV_COMM_SESSION_ID; in Process()
331 tlvs[length++] = OT_MESHCOP_TLV_STEERING_DATA; in Process()
335 tlvs[length++] = OT_MESHCOP_TLV_JOINER_UDP_PORT; in Process()
342 readLength = static_cast<uint16_t>(sizeof(tlvs) - length); in Process()
343 SuccessOrExit(error = aArgs->ParseAsHexString(readLength, tlvs + length)); in Process()
344 length += static_cast<uint8_t>(readLength); in Process()
352 error = otCommissionerSendMgmtGet(GetInstancePtr(), tlvs, static_cast<uint8_t>(length)); in Process()
[all …]
/openthread-3.7.0/tests/scripts/thread-cert/
Dtest_coap.py70 def any_bytearray(length): argument
71 return bytearray([random.getrandbits(8) for _ in range(length)])
91 length = random.randint(0, 8)
92 return bytearray([random.getrandbits(8) for _ in range(length)])
99 def any_payload(length=None): argument
100 length = length if length is not None else random.randint(0, 64)
101 return bytearray([random.getrandbits(8) for _ in range(length)])
152 length = any_4bits_value_different_than_13_and_14()
154 data = bytearray([delta << 4 | length])
161 self.assertEqual(length, option_header.length)
[all …]
Dpcap.py68 length = 0
75 length = 4 + len(pcap_tap_fcs_tlv) + len(pcap_tap_channel_tlv)
76 pcap_tap_header = struct.pack("<HH", 0, length)
79 length += len(frame)
80 pcap_frame = struct.pack("<LLLL", sec, usec, length, length)
/openthread-3.7.0/third_party/tcplp/lib/
Dlbuf.c46 buffer->length = newentry->mLength; in lbuf_append()
51 buffer->length += newentry->mLength; in lbuf_append()
58 buffer->length += numbytes; in lbuf_extend()
71 buffer->length -= (curr->mLength - curroffset); in lbuf_pop()
84 buffer->length -= bytesleft; in lbuf_pop()
94 if (buffer->length < offset + numbytes) { in lbuf_getrange()
114 return buffer->length; in lbuf_used_space()
/openthread-3.7.0/third_party/mbedtls/repo/library/
Dcipher_wrap.h84 int (*cbc_func)(void *ctx, mbedtls_operation_t mode, size_t length,
91 int (*cfb_func)(void *ctx, mbedtls_operation_t mode, size_t length, size_t *iv_off,
98 int (*ofb_func)(void *ctx, size_t length, size_t *iv_off,
106 int (*ctr_func)(void *ctx, size_t length, size_t *nc_off,
113 int (*xts_func)(void *ctx, mbedtls_operation_t mode, size_t length,
120 int (*stream_func)(void *ctx, size_t length,

12345678910