Lines Matching refs:bin_len
18 size_t bin_len, bin_len2;
25 sodium_hex2bin(buf4, sizeof buf4, hex, strlen(hex), ": ", &bin_len,
27 printf("%lu:%02x%02x%02x%02x\n", (unsigned long) bin_len,
32 sodium_hex2bin(buf4, sizeof buf4, hex, strlen(hex), ": ", &bin_len, NULL);
33 printf("%lu:%02x%02x%02x%02x\n", (unsigned long) bin_len,
37 if (sodium_hex2bin(buf1, 1U, hex, 8U, NULL, &bin_len, &hex_end) != -1) {
43 if (sodium_hex2bin(buf1, 4U, hex, 12U, ":", &bin_len, &hex_end) != -1) {
52 &bin_len, &hex_end) != -1) {
59 &bin_len, &hex_end) != -1) {
66 &bin_len, NULL) != -1) {
72 &bin_len, &hex_end) != 0) {
79 &bin_len, NULL) != -1) {
122 assert(sodium_base642bin(buf4, sizeof buf4, b64, strlen(b64), "\n\r ", &bin_len,
124 buf4[bin_len] = 0;
129 assert(sodium_base642bin(buf1, sizeof buf1, b64, strlen(b64), "\n\r ", &bin_len,
131 buf1[bin_len] = 0;
136 assert(sodium_base642bin(buf1, sizeof buf1, b64, strlen(b64), NULL, &bin_len,
138 buf1[bin_len] = 0;
207 bin_len = (size_t) randombytes_uniform(100);
208 bin = (unsigned char *) sodium_malloc(bin_len);
209 b64_len = (bin_len + 2U) / 3U * 4U + 1U;
210 assert(b64_len == sodium_base64_encoded_len(bin_len, sodium_base64_VARIANT_URLSAFE));
212 randombytes_buf(bin, bin_len);
213 memcpy(buf1, bin, bin_len);
214 b64 = sodium_bin2base64(b64_, b64_len, bin, bin_len,
217 assert(sodium_base642bin(bin, bin_len + 10, b64, b64_len,
221 assert(memcmp(bin, buf1, bin_len) == 0);