Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 57) sorted by relevance

123

/crypto/x509/
A Dx509name.cc157 int type, const unsigned char *bytes, in X509_NAME_add_entry_by_OBJ() argument
160 X509_NAME_ENTRY_create_by_OBJ(NULL, obj, type, bytes, len); in X509_NAME_add_entry_by_OBJ()
173 X509_NAME_ENTRY_create_by_NID(NULL, nid, type, bytes, len); in X509_NAME_add_entry_by_NID()
186 X509_NAME_ENTRY_create_by_txt(NULL, field, type, bytes, len); in X509_NAME_add_entry_by_txt()
271 nentry = X509_NAME_ENTRY_create_by_OBJ(ne, obj, type, bytes, len); in X509_NAME_ENTRY_create_by_txt()
285 return X509_NAME_ENTRY_create_by_OBJ(ne, obj, type, bytes, len); in X509_NAME_ENTRY_create_by_NID()
305 if (!X509_NAME_ENTRY_set_data(ret, type, bytes, len)) { in X509_NAME_ENTRY_create_by_OBJ()
332 if ((ne == NULL) || ((bytes == NULL) && (len != 0))) { in X509_NAME_ENTRY_set_data()
336 return ASN1_STRING_set_by_NID(&ne->value, bytes, len, type, in X509_NAME_ENTRY_set_data()
342 len = strlen((const char *)bytes); in X509_NAME_ENTRY_set_data()
[all …]
A Dx_name.cc103 if ((ret->bytes = BUF_MEM_new()) == NULL) { in IMPLEMENT_EXTERN_ASN1()
129 BUF_MEM_free(a->bytes); in x509_name_ex_free()
181 if (!BUF_MEM_grow(nm->bytes, p - q)) { in x509_name_ex_d2i()
184 OPENSSL_memcpy(nm->bytes->data, q, p - q); in x509_name_ex_d2i()
221 int ret = a->bytes->length; in x509_name_ex_i2d()
223 OPENSSL_memcpy(*out, a->bytes->data, ret); in x509_name_ex_i2d()
267 if (!BUF_MEM_grow(a->bytes, len)) { in x509_name_encode()
270 p = (unsigned char *)a->bytes->data; in x509_name_encode()
486 *out_der = (unsigned char *)nm->bytes->data; in X509_NAME_get0_der()
489 *out_der_len = nm->bytes->length; in X509_NAME_get0_der()
A Dx509_att.cc71 const unsigned char *bytes, in X509_ATTRIBUTE_create_by_txt() argument
82 nattr = X509_ATTRIBUTE_create_by_OBJ(attr, obj, type, bytes, len); in X509_ATTRIBUTE_create_by_txt()
/crypto/pem/
A Dpem_test.cc144 std::vector<uint8_t> bytes = DecodePEMBytes(kEncryptedPEM); in TEST() local
145 ASSERT_FALSE(bytes.empty()); in TEST()
147 bssl::UniquePtr<BIO> bio(BIO_new_mem_buf(bytes.data(), bytes.size())); in TEST()
155 bssl::UniquePtr<BIO> bio(BIO_new_mem_buf(bytes.data(), bytes.size())); in TEST()
167 bssl::UniquePtr<BIO> bio(BIO_new_mem_buf(bytes.data(), bytes.size())); in TEST()
216 bytes = DecodePEMBytes(kEncryptedPEMEmpty); in TEST()
218 ASSERT_FALSE(bytes.empty()); in TEST()
219 bssl::UniquePtr<BIO> bio(BIO_new_mem_buf(bytes.data(), bytes.size())); in TEST()
/crypto/fipsmodule/bn/
A Dbytes.cc.inc106 // Make sure the top bytes will be zeroed.
120 // represented in |num_bytes| bytes.
123 const uint8_t *bytes = (const uint8_t *)words;
127 mask |= bytes[i];
133 const uint8_t *bytes = (const uint8_t *)bn->d;
138 assert(bytes[i] == 0);
140 (void)bytes;
151 const uint8_t *bytes = (const uint8_t *)in;
158 out[out_len - i - 1] = bytes[i];
177 const uint8_t *bytes = (const uint8_t *)in->d;
[all …]
A Dbn_test.cc1058 for (size_t bytes = 128 - 7; bytes <= 128; bytes++) { in TEST_F() local
1061 ASSERT_EQ(bytes, BN_num_bytes(n.get())); in TEST_F()
1062 ASSERT_EQ(bytes, BN_bn2bin(n.get(), reference)); in TEST_F()
1072 EXPECT_EQ(Bytes(reference, bytes), Bytes(out, bytes)); in TEST_F()
1077 EXPECT_EQ(Bytes(reference, bytes), Bytes(out + 1, bytes)); in TEST_F()
1081 EXPECT_EQ(Bytes(zeros, sizeof(out) - bytes), in TEST_F()
1082 Bytes(out, sizeof(out) - bytes)); in TEST_F()
1083 EXPECT_EQ(Bytes(reference, bytes), Bytes(out + sizeof(out) - bytes, bytes)); in TEST_F()
1092 EXPECT_EQ(Bytes(reference, bytes), Bytes(out + 1, bytes)); in TEST_F()
1114 for (size_t bytes = 128 - 7; bytes <= 128; bytes++) { in TEST_F() local
[all …]
/crypto/bytestring/
A Dcbs.cc479 CBS bytes; in CBS_get_asn1_uint64_with_tag() local
480 if (!CBS_get_asn1(cbs, &bytes, tag) || in CBS_get_asn1_uint64_with_tag()
486 const uint8_t *data = CBS_data(&bytes); in CBS_get_asn1_uint64_with_tag()
487 size_t len = CBS_len(&bytes); in CBS_get_asn1_uint64_with_tag()
506 CBS bytes; in CBS_get_asn1_int64_with_tag() local
507 if (!CBS_get_asn1(cbs, &bytes, tag) || in CBS_get_asn1_int64_with_tag()
511 const uint8_t *data = CBS_data(&bytes); in CBS_get_asn1_int64_with_tag()
512 const size_t len = CBS_len(&bytes); in CBS_get_asn1_int64_with_tag()
524 CBS bytes; in CBS_get_asn1_bool() local
525 if (!CBS_get_asn1(cbs, &bytes, CBS_ASN1_BOOLEAN) || CBS_len(&bytes) != 1) { in CBS_get_asn1_bool()
[all …]
A Dcbb.cc555 uint8_t bytes[sizeof(int64_t)]; in CBB_add_asn1_int64_with_tag() local
556 memcpy(bytes, &value, sizeof(value)); in CBB_add_asn1_int64_with_tag()
559 while (start > 0 && (bytes[start] == 0xff && (bytes[start - 1] & 0x80))) { in CBB_add_asn1_int64_with_tag()
568 if (!CBB_add_u8(&child, bytes[i])) { in CBB_add_asn1_int64_with_tag()
/crypto/fipsmodule/ec/
A Dfelem.cc.inc32 uint8_t bytes[EC_MAX_BYTES];
34 assert(sizeof(bytes) >= len);
36 !BN_bn2bin_padded(bytes, len, in)) {
41 return ec_felem_from_bytes(group, out, bytes, len);
45 uint8_t bytes[EC_MAX_BYTES];
47 ec_felem_to_bytes(group, bytes, &len, in);
48 return BN_bin2bn(bytes, len, out) != NULL;
A Dmake_tables.go392 bytes := n.Bytes()
393 for i, b := range bytes {
394 i = len(bytes) - i - 1
403 bytes := n.Bytes()
404 for i, b := range bytes {
405 i = len(bytes) - i - 1
420 idx := bytes.LastIndexByte(p[:n], '\n')
/crypto/fipsmodule/
A Dbcm_interface.h277 uint8_t bytes[32 + 32 + 64 + 256 * 4 * (5 + 6 + 6)]; member
284 uint8_t bytes[32 + 64 + 256 * 4 * 6]; member
291 uint8_t bytes[200 + 4 + 4 + 4 * sizeof(size_t)]; member
419 uint8_t bytes[32 + 64 + 256 * 4 * 8]; member
426 uint8_t bytes[200 + 4 + 4 + 4 * sizeof(size_t)]; member
553 uint8_t bytes[32 + 64 + 256 * 4 * 4]; member
560 uint8_t bytes[200 + 4 + 4 + 4 * sizeof(size_t)]; member
710 uint8_t bytes[512 * (3 + 9) + 32 + 32]; member
717 uint8_t bytes[512 * (3 + 3 + 9) + 32 + 32 + 32]; member
799 uint8_t bytes[512 * (4 + 16) + 32 + 32]; member
[all …]
/crypto/fipsmodule/rand/
A Drand.cc.inc52 // CRNGT_BLOCK_SIZE is the number of bytes in a “block” for the purposes of the
189 // bytes contains entropy suitable for seeding a DRBG.
191 // bytes_valid indicates the number of bytes of |bytes| that contain valid
194 // want_additional_input is true if any of the contents of |bytes| were
208 const size_t space = sizeof(buffer->bytes) - buffer->bytes_valid;
220 // get_seed_entropy fills |out_entropy_len| bytes of |out_entropy| from the
225 if (out_entropy_len > sizeof(buffer->bytes)) {
237 OPENSSL_memcpy(out_entropy, buffer->bytes, out_entropy_len);
238 OPENSSL_memmove(buffer->bytes, &buffer->bytes[out_entropy_len],
250 // |*out_additional_input_len| to the number of extra bytes.
[all …]
/crypto/poly1305/
A Dpoly1305_vec.cc250 while (bytes >= 64) { in poly1305_blocks()
412 bytes -= 64; in poly1305_blocks()
449 if (bytes >= 32) { in poly1305_combine()
672 if (bytes == 0) { in CRYPTO_poly1305_update()
681 bytes -= 32; in CRYPTO_poly1305_update()
685 bytes -= want; in CRYPTO_poly1305_update()
701 bytes -= want; in CRYPTO_poly1305_update()
712 if (bytes >= 64) { in CRYPTO_poly1305_update()
713 want = (bytes & ~63); in CRYPTO_poly1305_update()
716 bytes -= want; in CRYPTO_poly1305_update()
[all …]
/crypto/fipsmodule/ecdsa/
A Decdsa_test.cc275 std::vector<uint8_t> bytes(order_len, 0xff); in TEST() local
276 ASSERT_TRUE(BN_bin2bn(bytes.data(), bytes.size(), sig->r)); in TEST()
277 ASSERT_TRUE(BN_bin2bn(bytes.data(), bytes.size(), sig->s)); in TEST()
341 std::vector<uint8_t> bytes; in GetBIGNUM() local
342 if (!t->GetBytes(&bytes, key)) { in GetBIGNUM()
346 return bssl::UniquePtr<BIGNUM>(BN_bin2bn(bytes.data(), bytes.size(), nullptr)); in GetBIGNUM()
/crypto/des/
A Ddes.cc340 DES_set_key_ex(key->bytes, schedule); in DES_set_key()
424 key->bytes[i] = kOddParity[key->bytes[i]]; in DES_set_odd_parity()
591 DES_ecb_encrypt_ex(in_block->bytes, out_block->bytes, schedule, is_encrypt); in DES_ecb_encrypt()
607 DES_ncbc_encrypt_ex(in, out, len, schedule, ivec->bytes, enc); in DES_ncbc_encrypt()
689 DES_ecb3_encrypt_ex(input->bytes, output->bytes, ks1, ks2, ks3, enc); in DES_ecb3_encrypt()
713 DES_ede3_cbc_encrypt_ex(in, out, len, ks1, ks2, ks3, ivec->bytes, enc); in DES_ede3_cbc_encrypt()
/crypto/cipher/
A De_aesctrhmac.cc112 uint8_t bytes[8]; in hmac_update_uint64() local
114 for (i = 0; i < sizeof(bytes); i++) { in hmac_update_uint64()
115 bytes[i] = value & 0xff; in hmac_update_uint64()
118 SHA256_Update(sha256, bytes, sizeof(bytes)); in hmac_update_uint64()
/crypto/cipher/test/
A Daes_128_gcm_tests.txt477 # 128 bytes AD
485 # 48 bytes plaintext
493 # 80 bytes plaintext
501 # 128 bytes plaintext
509 # 192 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF
517 # 288 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF
525 # 80 bytes plaintext, submitted by Intel
A Dcipher_tests.txt510 # 128 bytes aad
519 # 48 bytes plaintext
528 # 80 bytes plaintext
537 # 128 bytes plaintext
546 # 192 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF
555 # 288 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF
564 # 80 bytes plaintext, submitted by Intel
/crypto/rand/
A Durandom_test.cc338 uint8_t bytes[8]; in memcpy_to_remote() local
340 bytes, ptrace(PTRACE_PEEKDATA, child_pid, in memcpy_to_remote()
342 memcpy(&bytes[offset], src, todo); in memcpy_to_remote()
343 word = CRYPTO_load_u64_le(bytes); in memcpy_to_remote()
368 uint8_t bytes[8]; in get_byte_from_remote() local
369 CRYPTO_store_u64_le(bytes, word); in get_byte_from_remote()
370 return bytes[offset]; in get_byte_from_remote()
/crypto/ecdh/
A Decdh_test.cc62 std::vector<uint8_t> bytes; in GetBIGNUM() local
63 if (!t->GetBytes(&bytes, key)) { in GetBIGNUM()
67 return bssl::UniquePtr<BIGNUM>(BN_bin2bn(bytes.data(), bytes.size(), nullptr)); in GetBIGNUM()
/crypto/bn/
A Dconvert.cc315 const size_t bytes = (bits + 7) / 8; in BN_bn2mpi() local
319 if (bytes != 0 && (bits & 0x07) == 0) { in BN_bn2mpi()
323 const size_t len = bytes + extend; in BN_bn2mpi()
324 if (len < bytes || 4 + len < len || (len & 0xffffffff) != len) { in BN_bn2mpi()
/crypto/kyber/
A Dinternal.h36 uint8_t bytes[512 * (3 + 9) + 32 + 32]; member
45 uint8_t bytes[512 * (3 + 3 + 9) + 32 + 32 + 32]; member
/crypto/obj/
A Dobjects.go378 var b bytes.Buffer
390 var b bytes.Buffer
488 var b bytes.Buffer
609 return bytes.Compare(a.encoded, b.encoded) < 0
/crypto/spake2plus/
A Dspake2plus.cc94 bool AddLengthPrefixed(CBB *cbb, Span<const uint8_t> bytes) { in AddLengthPrefixed() argument
95 return CBB_add_u64le(cbb, bytes.size()) && in AddLengthPrefixed()
96 CBB_add_bytes(cbb, bytes.data(), bytes.size()); in AddLengthPrefixed()
/crypto/
A Dcompiler_test.cc215 uint8_t bytes[sizeof(null)] = {0}; in TEST() local
216 EXPECT_EQ(Bytes(bytes), in TEST()

Completed in 743 milliseconds

123