Home
last modified time | relevance | path

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

1234

/crypto/asn1/
A Dasn1_lib.cc156 if (length <= 127) { in asn1_put_length()
159 l = length; in asn1_put_length()
167 length >>= 8; in asn1_put_length()
176 if (length < 0) { in ASN1_object_size()
189 if (length > 127) { in ASN1_object_size()
190 int tmplen = length; in ASN1_object_size()
200 return ret + length; in ASN1_object_size()
262 str->length = (int)len; in ASN1_STRING_set()
277 str->length = len; in ASN1_STRING_set0()
291 ret->length = 0; in ASN1_STRING_type_new()
[all …]
A Da_bitstr.cc35 int len = str->length; in asn1_bit_string_length()
169 ret->length = (int)len; in c2i_ASN1_BIT_STRING()
203 if ((a->length < (w + 1)) || (a->data == NULL)) { in ASN1_BIT_STRING_set_bit()
215 if (w + 1 - a->length > 0) { in ASN1_BIT_STRING_set_bit()
216 OPENSSL_memset(c + a->length, 0, w + 1 - a->length); in ASN1_BIT_STRING_set_bit()
219 a->length = w + 1; in ASN1_BIT_STRING_set_bit()
222 while ((a->length > 0) && (a->data[a->length - 1] == 0)) { in ASN1_BIT_STRING_set_bit()
223 a->length--; in ASN1_BIT_STRING_set_bit()
233 if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL)) { in ASN1_BIT_STRING_get_bit()
253 for (i = 0; i < a->length && ok; ++i) { in ASN1_BIT_STRING_check()
A Dtasn_enc.cc382 int length; member
389 cmplen = (d1->length < d2->length) ? d1->length : d2->length; in der_cmp()
394 return d1->length - d2->length; in der_cmp()
428 encoded[i].length = ASN1_item_ex_i2d(&skitem, &p, item, -1, 0); in asn1_set_seq_out()
429 if (encoded[i].length < 0) { in asn1_set_seq_out()
440 OPENSSL_memcpy(p, encoded[i].data, encoded[i].length); in asn1_set_seq_out()
441 p += encoded[i].length; in asn1_set_seq_out()
583 len = otmp->length; in asn1_ex_i2c()
650 len = strtmp->length; in asn1_ex_i2c()
A Da_strex.cc190 int outlen = do_hex_dump(out, str->data, str->length); in do_dump()
284 int len = do_buf(str->data, str->length, encoding, flags, &quotes, NULL); in ASN1_STRING_print_ex()
298 do_buf(str->data, str->length, encoding, flags, NULL, out) < 0 || in ASN1_STRING_print_ex()
332 stmp.length = 0; in ASN1_STRING_to_UTF8()
335 ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING); in ASN1_STRING_to_UTF8()
340 return stmp.length; in ASN1_STRING_to_UTF8()
353 for (i = 0; i < v->length; i++) { in ASN1_STRING_print()
391 CBS_init(&cbs, tm->data, tm->length); in ASN1_GENERALIZEDTIME_print()
405 CBS_init(&cbs, tm->data, tm->length); in ASN1_UTCTIME_print()
A Da_object.cc36 if (in->length <= 0) { in i2d_ASN1_OBJECT()
42 if (!CBB_init(&cbb, (size_t)in->length + 2) || in i2d_ASN1_OBJECT()
44 !CBB_add_bytes(&child, in->data, in->length)) { in i2d_ASN1_OBJECT()
149 ret->length = 0; in ASN1_OBJECT_new()
170 a->length = 0; in ASN1_OBJECT_free()
189 o.length = (int)len; in ASN1_OBJECT_create()
A Da_int.cc99 CBS_init(&cbs, in->data, in->length); in i2c_ASN1_INTEGER()
201 negate_twos_complement(ret->data, ret->length); in c2i_ASN1_INTEGER()
207 assert(ret->length == 0 || ret->data[0] != 0); in c2i_ASN1_INTEGER()
209 assert(!is_negative || ret->length > 0); in c2i_ASN1_INTEGER()
292 if (a->length > (int)sizeof(buf)) { in asn1_string_get_abs_uint64()
296 OPENSSL_memcpy(buf + sizeof(buf) - a->length, a->data, a->length); in asn1_string_get_abs_uint64()
425 if ((ret = BN_bin2bn(ai->data, ai->length, bn)) == NULL) { in asn1_string_to_bn()
A Da_time.cc94 if (!ASN1_STRING_set(ret, in->data, in->length)) { in ASN1_TIME_to_generalizedtime()
101 if (!ASN1_STRING_set(ret, NULL, in->length + 2)) { in ASN1_TIME_to_generalizedtime()
108 const size_t out_str_capacity = in->length + 2 + 1; in ASN1_TIME_to_generalizedtime()
A Df_string.cc28 if (a->length == 0) { in i2a_ASN1_STRING()
34 for (i = 0; i < a->length; i++) { in i2a_ASN1_STRING()
A Df_int.cc35 if (a->length == 0) { in i2a_ASN1_INTEGER()
41 for (i = 0; i < a->length; i++) { in i2a_ASN1_INTEGER()
/crypto/bio/
A Dbio_mem.cc46 b->length = size; in BIO_new_mem_buf()
99 if ((size_t)ret > b->length) { in mem_read()
100 ret = (int)b->length; in mem_read()
105 b->length -= ret; in mem_read()
111 } else if (b->length == 0) { in mem_read()
149 if ((size_t)ret > b->length) { in mem_gets()
150 ret = (int)b->length; in mem_gets()
175 b->length = b->max; in mem_ctrl()
178 b->length = 0; in mem_ctrl()
183 return b->length == 0; in mem_ctrl()
[all …]
/crypto/buf/
A Dbuf_test.cc27 EXPECT_EQ(0u, buf->length); in TEST()
32 EXPECT_EQ(0u, buf->length); in TEST()
38 EXPECT_EQ(0u, buf->length); in TEST()
42 EXPECT_EQ(100u, buf->length); in TEST()
44 memset(buf->data, 'A', buf->length); in TEST()
49 EXPECT_EQ(100u, buf->length); in TEST()
57 EXPECT_EQ(150u, buf->length); in TEST()
69 EXPECT_EQ(new_len, buf->length); in TEST()
79 EXPECT_EQ(50u, buf->length); in TEST()
96 EXPECT_EQ("hello world" + str, std::string(buf->data, buf->length)); in TEST()
A Dbuf.cc69 if (buf->length < len) { in BUF_MEM_grow()
70 OPENSSL_memset(&buf->data[buf->length], 0, len - buf->length); in BUF_MEM_grow()
72 buf->length = len; in BUF_MEM_grow()
85 size_t new_len = buf->length + len; in BUF_MEM_append()
93 OPENSSL_memcpy(buf->data + buf->length, in, len); in BUF_MEM_append()
94 buf->length = new_len; in BUF_MEM_append()
/crypto/x509/
A Dx_x509.cc354 length -= q - *pp; in d2i_X509_AUX()
356 if (length > 0 && !d2i_X509_CERT_AUX(&ret->aux, &q, length)) { in d2i_X509_AUX()
376 int length, tmplen; in i2d_x509_aux_internal() local
384 length = i2d_X509(a, pp); in i2d_x509_aux_internal()
386 return length; in i2d_x509_aux_internal()
397 length += tmplen; in i2d_x509_aux_internal()
400 return length; in i2d_x509_aux_internal()
411 int length; in i2d_X509_AUX() local
421 return length; in i2d_X509_AUX()
432 if (length <= 0) { in i2d_X509_AUX()
[all …]
A Dv3_ia5.cc32 if (!ia5 || !ia5->length) { in i2s_ASN1_IA5STRING()
35 if (!(tmp = reinterpret_cast<char *>(OPENSSL_malloc(ia5->length + 1)))) { in i2s_ASN1_IA5STRING()
38 OPENSSL_memcpy(tmp, ia5->data, ia5->length); in i2s_ASN1_IA5STRING()
39 tmp[ia5->length] = 0; in i2s_ASN1_IA5STRING()
A Dv3_ncons.cc159 len = ip->length; in print_nc_ipadd()
389 CBS_init(&dns_cbs, dns->data, dns->length); in nc_dns()
390 CBS_init(&base_cbs, base->data, base->length); in nc_dns()
425 CBS_init(&eml_cbs, eml->data, eml->length); in nc_email()
426 CBS_init(&base_cbs, base->data, base->length); in nc_email()
473 CBS_init(&uri_cbs, uri->data, uri->length); in nc_uri()
474 CBS_init(&base_cbs, base->data, base->length); in nc_uri()
A Dx_name.cc221 int ret = a->bytes->length; in x509_name_ex_i2d()
395 out->length = ASN1_STRING_to_UTF8(&out->data, in); in asn1_string_canon()
396 if (out->length == -1) { in asn1_string_canon()
403 len = out->length; in asn1_string_canon()
443 out->length = to - out->data; in asn1_string_canon()
489 *out_der_len = nm->bytes->length; in X509_NAME_get0_der()
/crypto/obj/
A Dobj.cc76 if (o->length != 0 && r->data == NULL) { in OBJ_dup()
80 r->length = o->length; in OBJ_dup()
114 if (a->length < b->length) { in OBJ_cmp()
116 } else if (a->length > b->length) { in OBJ_cmp()
131 if (obj == NULL || obj->length < 0) { in OBJ_length()
135 return (size_t)obj->length; in OBJ_length()
193 obj.length = (int)CBS_len(cbs); in OBJ_cbs2nid()
393 if (obj == NULL || obj->length == 0) { in OBJ_obj2txt()
411 CBS_init(&cbs, obj->data, obj->length); in OBJ_obj2txt()
432 return OPENSSL_hash32(obj->data, obj->length); in hash_data()
[all …]
/crypto/rand/
A Durandom_test.cc88 length == other.length && // in operator ==()
93 static Event GetRandom(size_t length, unsigned flags) { in GetRandom()
95 e.length = length; in GetRandom()
106 static Event UrandomRead(size_t length) { in UrandomRead()
108 e.length = length; in UrandomRead()
122 static Event SocketRead(size_t length) { in SocketRead()
124 e.length = length; in SocketRead()
175 size_t length = 0; member
502 uint64_t length = regs.args[2]; in GetTrace() local
503 out_trace->push_back(Event::SocketRead(length)); in GetTrace()
[all …]
A Durandom.cc120 int length = __system_property_get("ro.boringcrypto.hwrand", value); in maybe_set_extra_getrandom_flags() local
121 if (length < 0 || length > PROP_VALUE_MAX) { in maybe_set_extra_getrandom_flags()
125 value[length] = 0; in maybe_set_extra_getrandom_flags()
/crypto/fipsmodule/
A Dbcm.cc239 uint64_t length = end - start; in BORINGSSL_integrity_test() local
240 HMAC_Update(&hmac_ctx, (const uint8_t *)&length, sizeof(length)); in BORINGSSL_integrity_test()
241 HMAC_Update(&hmac_ctx, start, length); in BORINGSSL_integrity_test()
243 length = rodata_end - rodata_start; in BORINGSSL_integrity_test()
244 HMAC_Update(&hmac_ctx, (const uint8_t *)&length, sizeof(length)); in BORINGSSL_integrity_test()
245 HMAC_Update(&hmac_ctx, rodata_start, length); in BORINGSSL_integrity_test()
/crypto/cipher/test/
A Dmake_legacy_aead_tests.go117 func makeTestCase(length int, options options) (*testCase, error) {
123 input := make([]byte, length)
129 adFull[len(adFull)-2] = uint8(length >> 8)
130 adFull[len(adFull)-1] = uint8(length & 0xff)
251 func addTestCase(length int, options options) {
252 t, err := makeTestCase(length, options)
/crypto/evp/
A Devp_tests.txt379 # Check a salt length with a non-standard digest length, to verify things are
381 # length, but the ecosystem has converged on matching the digest length, so we
390 # Auto-detected salt length
398 # Signing with salt length -1 means to match the digest length.
407 # Signing with salt length -2 means to maximize the salt length.
443 # Wrong salt length
452 # Wrong salt length using implicit hash length
578 # Non-zero salt length.
586 # Non-zero salt length, wrong salt length.
595 # Non-zero salt length, match hash length.
[all …]
/crypto/fipsmodule/aes/
A Dmode_wrappers.cc.inc80 void AES_ofb128_encrypt(const uint8_t *in, uint8_t *out, size_t length,
83 CRYPTO_ofb128_encrypt(in, out, length, key, ivec, &num_u, aes_encrypt);
87 void AES_cfb128_encrypt(const uint8_t *in, uint8_t *out, size_t length,
91 CRYPTO_cfb128_encrypt(in, out, length, key, ivec, &num_u, enc, aes_encrypt);
A Dinternal.h95 void aes_hw_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t length,
152 inline void aes_hw_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t length, in aes_hw_cbc_encrypt() argument
167 void aes_hw_ecb_encrypt(const uint8_t *in, uint8_t *out, size_t length,
174 void bsaes_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t length,
189 inline void bsaes_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t length, in bsaes_cbc_encrypt() argument
222 void vpaes_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t length,
246 inline void vpaes_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t length, in vpaes_cbc_encrypt() argument
/crypto/fipsmodule/bn/test/
A Dmod_exp_tests.txt591 # lengths of the inputs, especially the *bit* length of |M|, matter a lot.
611 …above except A is negative. Note that A mod M with a "correct top" isn't the right length for RSAZ.
617 …d M) so A ^ E (mod M) == 0. Note that A mod M with a "correct top" isn't the right length for RSAZ.
623 # A is negative, and A (mod M) is the right length for RSAZ.
631 # Note that the lengths of the inputs, especially the *bit* length of |M|, matter a lot.
651 …above except A is negative. Note that A mod M with a "correct top" isn't the right length for RSAZ.
657 …d M) so A ^ E (mod M) == 0. Note that A mod M with a "correct top" isn't the right length for RSAZ.
663 # A is negative, and A (mod M) is the right length for RSAZ.

Completed in 37 milliseconds

1234