Lines Matching refs:len

51     void (*encode_fn)(cryptstate_T *state, char_u *from, size_t len,
53 void (*decode_fn)(cryptstate_T *state, char_u *from, size_t len,
58 long (*encode_buffer_fn)(cryptstate_T *state, char_u *from, size_t len,
60 long (*decode_buffer_fn)(cryptstate_T *state, char_u *from, size_t len,
70 void (*encode_inplace_fn)(cryptstate_T *state, char_u *p1, size_t len,
72 void (*decode_inplace_fn)(cryptstate_T *state, char_u *p1, size_t len,
190 crypt_method_nr_from_magic(char *ptr, int len) in crypt_method_nr_from_magic() argument
194 if (len < CRYPT_MAGIC_LEN) in crypt_method_nr_from_magic()
202 if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0) in crypt_method_nr_from_magic()
396 int len = crypt_get_header_len(method_nr); in crypt_create_for_writing() local
403 *header_len = len; in crypt_create_for_writing()
404 *header = alloc(len); in crypt_create_for_writing()
467 size_t len, in crypt_encode_alloc() argument
475 return method->encode_buffer_fn(state, from, len, newptr, last); in crypt_encode_alloc()
476 if (len == 0) in crypt_encode_alloc()
478 return (long)len; in crypt_encode_alloc()
480 *newptr = alloc(len + 50); in crypt_encode_alloc()
483 method->encode_fn(state, from, len, *newptr, last); in crypt_encode_alloc()
484 return (long)len; in crypt_encode_alloc()
496 long len, in crypt_decode_alloc() argument
504 return method->decode_buffer_fn(state, ptr, len, newptr, last); in crypt_decode_alloc()
506 if (len == 0) in crypt_decode_alloc()
508 return len; in crypt_decode_alloc()
510 *newptr = alloc(len); in crypt_decode_alloc()
513 method->decode_fn(state, ptr, len, *newptr, last); in crypt_decode_alloc()
514 return len; in crypt_decode_alloc()
525 size_t len, in crypt_encode() argument
529 cryptmethods[state->method_nr].encode_fn(state, from, len, to, last); in crypt_encode()
540 size_t len,
544 cryptmethods[state->method_nr].decode_fn(state, from, len, to, last);
555 size_t len, in crypt_encode_inplace() argument
558 cryptmethods[state->method_nr].encode_inplace_fn(state, buf, len, in crypt_encode_inplace()
569 size_t len, in crypt_decode_inplace() argument
572 cryptmethods[state->method_nr].decode_inplace_fn(state, buf, len, in crypt_decode_inplace()
775 size_t len UNUSED,
787 if (len <= crypto_secretstream_xchacha20poly1305_HEADERBYTES)
797 if (sod_st->count && len <= crypto_secretstream_xchacha20poly1305_ABYTES)
804 from, len, NULL, 0, tag);
820 size_t len UNUSED,
834 && len <= crypto_secretstream_xchacha20poly1305_HEADERBYTES)
840 buf_out = (char_u *)alloc(len);
857 len -= crypto_secretstream_xchacha20poly1305_HEADERBYTES;
863 if (sod_st->count && len <= crypto_secretstream_xchacha20poly1305_ABYTES)
869 buf_out, &buf_len, &tag, from, len, NULL, 0) != 0)
898 size_t len UNUSED, in crypt_sodium_buffer_encode()
912 length = (int)len + crypto_secretstream_xchacha20poly1305_ABYTES in crypt_sodium_buffer_encode()
930 &out_len, from, len, NULL, 0, tag); in crypt_sodium_buffer_encode()
948 size_t len UNUSED, in crypt_sodium_buffer_decode()
957 *buf_out = alloc_clear(len); in crypt_sodium_buffer_decode()
973 len -= crypto_secretstream_xchacha20poly1305_HEADERBYTES; in crypt_sodium_buffer_decode()
977 *buf_out, &out_len, &tag, from, len, NULL, 0) != 0) in crypt_sodium_buffer_decode()