Home
last modified time | relevance | path

Searched refs:b64 (Results 1 – 25 of 59) sorted by relevance

123

/src/sys/contrib/libsodium/test/default/
H A Dcodecs.c10 const char *b64; in main() local
120 b64 = "VGhpcyBpcyBhIGpvdXJu" "\n" "ZXkgaW50by" " " "Bzb3VuZA=="; in main()
122 assert(sodium_base642bin(buf4, sizeof buf4, b64, strlen(b64), "\n\r ", &bin_len, in main()
129 assert(sodium_base642bin(buf1, sizeof buf1, b64, strlen(b64), "\n\r ", &bin_len, in main()
136 assert(sodium_base642bin(buf1, sizeof buf1, b64, strlen(b64), NULL, &bin_len, in main()
142 assert(sodium_base642bin(buf1, sizeof buf1, b64, strlen(b64), NULL, NULL, in main()
144 assert(sodium_base642bin(buf1, sizeof buf1, b64, strlen(b64), NULL, NULL, in main()
146 assert(sodium_base642bin(buf1, sizeof buf1, b64, strlen(b64), " \r\n", NULL, in main()
148 assert(sodium_base642bin(buf1, sizeof buf1, b64, strlen(b64), NULL, NULL, in main()
150 assert(sodium_base642bin(buf1, sizeof buf1, b64, strlen(b64), " \r\n", NULL, in main()
[all …]
/src/crypto/openssl/test/
H A Dbio_base64_test.c96 …static const unsigned char b64[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567… in encode() local
111 if (memoutws(mem, b64[v >> 18], wscnt, llen, &pos) == 0 in encode()
112 || memoutws(mem, b64[(v >> 12) & 0x3f], wscnt, llen, &pos) == 0 in encode()
113 || memoutws(mem, b64[(v >> 6) & 0x3f], wscnt, llen, &pos) == 0 in encode()
114 || memoutws(mem, b64[v & 0x3f], wscnt, llen, &pos) == 0) in encode()
124 if (memoutws(mem, b64[(v >> 10) & 0x3f], wscnt, llen, &pos) == 0 in encode()
125 || memoutws(mem, b64[(v >> 4) & 0x3f], wscnt, llen, &pos) == 0 in encode()
126 || memoutws(mem, b64[(v & 0xf) << 2], wscnt, llen, &pos) == 0 in encode()
132 if (memoutws(mem, b64[v >> 2], wscnt, llen, &pos) == 0 in encode()
133 || memoutws(mem, b64[(v & 0x3) << 4], wscnt, llen, &pos) == 0 in encode()
[all …]
H A Dbio_enc_test.c276 BIO *mem = NULL, *b64 = NULL, *cbio = NULL; in test_bio_enc_eof_read_flush() local
286 || !TEST_ptr(b64 = BIO_new(BIO_f_base64())) in test_bio_enc_eof_read_flush()
288 || !TEST_ptr(BIO_push(b64, mem)) in test_bio_enc_eof_read_flush()
289 || !TEST_ptr(BIO_push(cbio, b64)) in test_bio_enc_eof_read_flush()
299 BIO_free(b64); in test_bio_enc_eof_read_flush()
300 b64 = cbio = NULL; in test_bio_enc_eof_read_flush()
305 || !TEST_ptr(b64 = BIO_new(BIO_f_base64())) in test_bio_enc_eof_read_flush()
307 || !TEST_ptr(BIO_push(b64, mem)) in test_bio_enc_eof_read_flush()
308 || !TEST_ptr(BIO_push(cbio, b64)) in test_bio_enc_eof_read_flush()
325 BIO_free(b64); in test_bio_enc_eof_read_flush()
/src/sys/contrib/libsodium/src/libsodium/sodium/
H A Dcodecs.c179 sodium_bin2base64(char * const b64, const size_t b64_maxlen, in sodium_bin2base64() argument
211 b64[b64_pos++] = (char) b64_byte_to_urlsafe_char((acc >> acc_len) & 0x3F); in sodium_bin2base64()
215 b64[b64_pos++] = (char) b64_byte_to_urlsafe_char((acc << (6 - acc_len)) & 0x3F); in sodium_bin2base64()
223 b64[b64_pos++] = (char) b64_byte_to_char((acc >> acc_len) & 0x3F); in sodium_bin2base64()
227 b64[b64_pos++] = (char) b64_byte_to_char((acc << (6 - acc_len)) & 0x3F); in sodium_bin2base64()
232 b64[b64_pos++] = '='; in sodium_bin2base64()
235 b64[b64_pos++] = 0U; in sodium_bin2base64()
238 return b64; in sodium_bin2base64()
242 _sodium_base642bin_skip_padding(const char * const b64, const size_t b64_len, in _sodium_base642bin_skip_padding() argument
253 c = b64[*b64_pos_p]; in _sodium_base642bin_skip_padding()
[all …]
/src/crypto/openssh/
H A Dsshbuf-misc.c94 sshbuf_dtob64(const struct sshbuf *d, struct sshbuf *b64, int wrap) in sshbuf_dtob64() argument
100 if (d == NULL || b64 == NULL || sshbuf_len(d) >= SIZE_MAX / 2) in sshbuf_dtob64()
113 if ((r = sshbuf_put_u8(b64, s[i])) != 0) in sshbuf_dtob64()
115 if (i % 70 == 69 && (r = sshbuf_put_u8(b64, '\n')) != 0) in sshbuf_dtob64()
118 if ((i - 1) % 70 != 69 && (r = sshbuf_put_u8(b64, '\n')) != 0) in sshbuf_dtob64()
121 if ((r = sshbuf_put(b64, s, strlen(s))) != 0) in sshbuf_dtob64()
149 sshbuf_b64tod(struct sshbuf *buf, const char *b64) in sshbuf_b64tod() argument
151 size_t plen = strlen(b64); in sshbuf_b64tod()
159 if ((nlen = b64_pton(b64, p, plen)) < 0) { in sshbuf_b64tod()
172 sshbuf_dtourlb64(const struct sshbuf *d, struct sshbuf *b64, int wrap) in sshbuf_dtourlb64() argument
[all …]
H A Dsshbuf.h242 int sshbuf_dtob64(const struct sshbuf *d, struct sshbuf *b64, int wrap);
244 int sshbuf_dtourlb64(const struct sshbuf *d, struct sshbuf *b64, int wrap);
247 int sshbuf_b64tod(struct sshbuf *buf, const char *b64);
/src/crypto/openssl/doc/man3/
H A DBIO_f_base64.pod73 BIO *bio, *b64;
76 b64 = BIO_new(BIO_f_base64());
78 BIO_push(b64, bio);
79 BIO_write(b64, message, strlen(message));
80 BIO_flush(b64);
82 BIO_free_all(b64);
87 BIO *bio, *b64, *bio_out;
91 b64 = BIO_new(BIO_f_base64());
94 BIO_push(b64, bio);
95 while ((inlen = BIO_read(b64, inbuf, 512)) > 0)
[all …]
H A DBIO_push.pod55 I<b64> is a base64 BIO and I<f> is a file BIO.
59 BIO_push(b64, f);
61 is made then the new chain will be I<b64-f>. After making the calls
63 BIO_push(md2, b64);
66 the new chain is I<md1-md2-b64-f>. Data written to I<md1> will be digested
77 will return I<b64> and the new chain will be I<md1-b64-f>.
/src/lib/libiscsiutil/
H A Dchap.c104 chap_b642bin(const char *b64, void **binp, size_t *bin_lenp) in chap_b642bin() argument
109 b64_len = strlen(b64); in chap_b642bin()
115 bin_len = b64_pton(b64, bin, bin_len); in chap_b642bin()
189 unsigned char *b64, *tmp; in chap_bin2hex() local
193 b64 = malloc(b64_len); in chap_bin2hex()
194 if (b64 == NULL) in chap_bin2hex()
197 tmp = b64; in chap_bin2hex()
201 return (b64); in chap_bin2hex()
/src/contrib/wpa/hostapd/
H A Dsae_pk_gen.c25 char *b64 = NULL, *pw = NULL, *pos, *src; in main() local
134 b64 = base64_encode(der, der_len, NULL); in main()
135 if (!b64) in main()
137 src = pos = b64; in main()
175 printf("sae_password=%s|pk=%s:%s\n", pw, m_hex, b64); in main()
190 os_free(b64); in main()
/src/contrib/unbound/sldns/
H A Dparseutil.c668 char* b64; in sldns_b64_ntop_base() local
672 b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123" in sldns_b64_ntop_base()
675 b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123" in sldns_b64_ntop_base()
682 target[o] = b64[src[i] >> 2]; in sldns_b64_ntop_base()
683 target[o+1] = b64[ ((src[i]&0x03)<<4) | (src[i+1]>>4) ]; in sldns_b64_ntop_base()
684 target[o+2] = b64[ ((src[i+1]&0x0f)<<2) | (src[i+2]>>6) ]; in sldns_b64_ntop_base()
685 target[o+3] = b64[ (src[i+2]&0x3f) ]; in sldns_b64_ntop_base()
693 target[o] = b64[src[i] >> 2]; in sldns_b64_ntop_base()
694 target[o+1] = b64[ ((src[i]&0x03)<<4) | (src[i+1]>>4) ]; in sldns_b64_ntop_base()
695 target[o+2] = b64[ ((src[i+1]&0x0f)<<2) ]; in sldns_b64_ntop_base()
[all …]
/src/contrib/wpa/src/utils/
H A Djson.c634 char *b64; in json_add_base64url() local
636 b64 = base64_url_encode(val, len, NULL); in json_add_base64url()
637 if (!b64) in json_add_base64url()
639 json_add_string(json, name, b64); in json_add_base64url()
640 os_free(b64); in json_add_base64url()
648 char *b64; in json_add_base64() local
650 b64 = base64_encode_no_lf(val, len, NULL); in json_add_base64()
651 if (!b64) in json_add_base64()
653 json_add_string(json, name, b64); in json_add_base64()
654 os_free(b64); in json_add_base64()
/src/sys/crypto/siphash/
H A Dsiphash.c62 ctx->buf.b64 = 0; in SipHash_InitX()
105 x = MIN(len, sizeof(ctx->buf.b64) - ctx->buflen); in SipBuf()
112 ctx->v[3] ^= le64toh(ctx->buf.b64); in SipBuf()
114 ctx->v[0] ^= le64toh(ctx->buf.b64); in SipBuf()
115 ctx->buf.b64 = 0; in SipBuf()
/src/crypto/openssl/apps/
H A Dasn1parse.c75 BIO *in = NULL, *b64 = NULL, *derout = NULL; in asn1parse_main() local
216 if ((b64 = BIO_new(BIO_f_base64())) == NULL) in asn1parse_main()
218 BIO_push(b64, in); in asn1parse_main()
220 in = b64; in asn1parse_main()
221 b64 = tmp; in asn1parse_main()
320 BIO_free(b64); in asn1parse_main()
H A Drand.c195 BIO *b64 = BIO_new(BIO_f_base64()); in rand_main() local
196 if (b64 == NULL) in rand_main()
198 out = BIO_push(b64, out); in rand_main()
H A Denc.c149 BIO *in = NULL, *out = NULL, *b64 = NULL, *benc = NULL, *rbio = NULL, *wbio = NULL; in enc_main() local
527 if ((b64 = BIO_new(BIO_f_base64())) == NULL) in enc_main()
530 BIO_set_callback_ex(b64, BIO_debug_callback_ex); in enc_main()
531 BIO_set_callback_arg(b64, (char *)bio_err); in enc_main()
534 BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL); in enc_main()
536 wbio = BIO_push(b64, wbio); in enc_main()
538 rbio = BIO_push(b64, rbio); in enc_main()
813 BIO_free(b64); in enc_main()
/src/crypto/openssl/test/recipes/
H A D90-test_store.t507 my $b64 = "";
510 $b64 .= $l unless $l =~ /:/;
513 my $der = decode_base64($b64);
514 unless (length($b64) / 4 * 3 - length($der) < 3) {
515 print STDERR "Length error, ",length($b64),
/src/contrib/file/magic/Magdir/
H A Dber30 >>>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01
38 >>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01
55 >>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01
/src/crypto/openssl/crypto/asn1/
H A Dasn_mime.c108 BIO *b64; in B64_write_ASN1() local
110 b64 = BIO_new(BIO_f_base64()); in B64_write_ASN1()
111 if (b64 == NULL) { in B64_write_ASN1()
118 out = BIO_push(b64, out); in B64_write_ASN1()
122 BIO_free(b64); in B64_write_ASN1()
141 BIO *b64; in b64_read_asn1() local
144 if ((b64 = BIO_new(BIO_f_base64())) == NULL) { in b64_read_asn1()
148 bio = BIO_push(b64, bio); in b64_read_asn1()
154 BIO_free(b64); in b64_read_asn1()
/src/sys/contrib/libsodium/src/libsodium/include/sodium/
H A Dutils.h85 char *sodium_bin2base64(char * const b64, const size_t b64_maxlen,
91 const char * const b64, const size_t b64_len,
/src/crypto/openssl/apps/lib/
H A Dhttp_server.c269 BIO *cbio = *pcbio, *getbio = NULL, *b64 = NULL; in http_server_get_asn1_req() local
391 || (b64 = BIO_new(BIO_f_base64())) == NULL) { in http_server_get_asn1_req()
396 BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL); in http_server_get_asn1_req()
397 getbio = BIO_push(b64, getbio); in http_server_get_asn1_req()
/src/contrib/llvm-project/llvm/lib/Target/NVPTX/
H A DNVPTXIntrinsics.td274 defm MATCH_ANY_SYNC_64 : MATCH_ANY_SYNC<Int64Regs, "b64", int_nvvm_match_any_sync_i64,
302 defm MATCH_ALLP_SYNC_64 : MATCH_ALLP_SYNC<Int64Regs, "b64", int_nvvm_match_all_sync_i64p,
344 !strconcat("cp.async.mbarrier.arrive", NoInc, AddrSpace, ".b64 [$addr];"),
348 !strconcat("cp.async.mbarrier.arrive", NoInc, AddrSpace, ".b64 [$addr];"),
442 !strconcat("mbarrier.init", AddrSpace, ".b64 [$addr], $count;"),
446 !strconcat("mbarrier.init", AddrSpace, ".b64 [$addr], $count;"),
457 !strconcat("mbarrier.inval", AddrSpace, ".b64 [$addr];"),
461 !strconcat("mbarrier.inval", AddrSpace, ".b64 [$addr];"),
472 !strconcat("mbarrier.arrive", AddrSpace, ".b64 $state, [$addr];"),
476 !strconcat("mbarrier.arrive", AddrSpace, ".b64 $state, [$addr];"),
[all …]
/src/sys/contrib/openzfs/config/
H A Dlib-ld.m4132 [# The compiler produces 64-bit code. Add option '-b64' so that the
135 *" -b64 "*) ;;
136 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
/src/crypto/krb5/src/clients/kvno/
H A Dkvno.c225 char linebuf[256], *b64; in read_pem_file() local
270 b64 = k5_buf_cstring(&buf); in read_pem_file()
271 if (b64 == NULL) { in read_pem_file()
275 der_cert = k5_base64_decode(b64, &dlen); in read_pem_file()
/src/contrib/wpa/src/eap_server/
H A Dtncs.c182 char *b64; in TNC_TNCS_SendMessage() local
198 b64 = base64_encode(message, messageLength, &b64len); in TNC_TNCS_SendMessage()
199 if (b64 == NULL) in TNC_TNCS_SendMessage()
206 os_free(b64); in TNC_TNCS_SendMessage()
215 (unsigned int) messageType, b64); in TNC_TNCS_SendMessage()
217 os_free(b64); in TNC_TNCS_SendMessage()

123