Lines Matching refs:datalen
62 size_t datalen = prep->datalen; in big_key_preparse() local
63 size_t enclen = datalen + CHACHA20POLY1305_AUTHTAG_SIZE; in big_key_preparse()
66 if (datalen <= 0 || datalen > 1024 * 1024 || !prep->data) in big_key_preparse()
72 prep->payload.data[big_key_len] = (void *)(unsigned long)datalen; in big_key_preparse()
74 if (datalen > BIG_KEY_FILE_THRESHOLD) { in big_key_preparse()
99 chacha20poly1305_encrypt(buf, prep->data, datalen, NULL, 0, in big_key_preparse()
128 void *data = kmalloc(datalen, GFP_KERNEL); in big_key_preparse()
134 memcpy(data, prep->data, prep->datalen); in big_key_preparse()
153 if (prep->datalen > BIG_KEY_FILE_THRESHOLD) { in big_key_free_preparse()
181 size_t datalen = (size_t)key->payload.data[big_key_len]; in big_key_destroy() local
183 if (datalen > BIG_KEY_FILE_THRESHOLD) { in big_key_destroy()
201 ret = key_payload_reserve(key, prep->datalen); in big_key_update()
216 size_t datalen = (size_t)key->payload.data[big_key_len]; in big_key_describe() local
222 datalen, in big_key_describe()
223 datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff"); in big_key_describe()
232 size_t datalen = (size_t)key->payload.data[big_key_len]; in big_key_read() local
235 if (!buffer || buflen < datalen) in big_key_read()
236 return datalen; in big_key_read()
238 if (datalen > BIG_KEY_FILE_THRESHOLD) { in big_key_read()
242 size_t enclen = datalen + CHACHA20POLY1305_AUTHTAG_SIZE; in big_key_read()
268 ret = datalen; in big_key_read()
271 memcpy(buffer, buf, datalen); in big_key_read()
279 ret = datalen; in big_key_read()
280 memcpy(buffer, key->payload.data[big_key_data], datalen); in big_key_read()