Lines Matching refs:buf

188 	    unsigned char *buf, size_t buflen) {  in dtls_p_hash()  argument
222 memcpy(buf, tmp, dlen); in dtls_p_hash()
223 buf += dlen; in dtls_p_hash()
239 memcpy(buf, tmp, buflen - len); in dtls_p_hash()
253 unsigned char *buf, size_t buflen) { in dtls_prf() argument
256 memset(buf, 0, buflen); in dtls_prf()
262 buf, buflen); in dtls_prf()
269 unsigned char *buf) { in dtls_mac() argument
279 dtls_hmac_finalize(hmac_ctx, buf); in dtls_mac()
284 unsigned char *buf, in dtls_ccm_encrypt() argument
294 buf, srclen, in dtls_ccm_encrypt()
301 size_t srclen, unsigned char *buf, in dtls_ccm_decrypt() argument
311 buf, srclen, in dtls_ccm_decrypt()
363 unsigned char *buf) { in dtls_ec_key_from_uint32_asn1() argument
365 unsigned char *buf_orig = buf; in dtls_ec_key_from_uint32_asn1()
373 *buf = 0; in dtls_ec_key_from_uint32_asn1()
374 buf++; in dtls_ec_key_from_uint32_asn1()
375 dtls_int_to_uint32(buf, key[i]); in dtls_ec_key_from_uint32_asn1()
376 buf += 4; in dtls_ec_key_from_uint32_asn1()
378 buf[0] = (key[i] >> 16) & 0xff; in dtls_ec_key_from_uint32_asn1()
379 buf[1] = (key[i] >> 8) & 0xff; in dtls_ec_key_from_uint32_asn1()
380 buf[2] = key[i] & 0xff; in dtls_ec_key_from_uint32_asn1()
381 buf += 3; in dtls_ec_key_from_uint32_asn1()
383 buf[0] = (key[i] >> 8) & 0xff; in dtls_ec_key_from_uint32_asn1()
384 buf[1] = key[i] & 0xff; in dtls_ec_key_from_uint32_asn1()
385 buf += 2; in dtls_ec_key_from_uint32_asn1()
387 buf[0] = key[i] & 0xff; in dtls_ec_key_from_uint32_asn1()
388 buf += 1; in dtls_ec_key_from_uint32_asn1()
390 dtls_int_to_uint32(buf, key[i]); in dtls_ec_key_from_uint32_asn1()
391 buf += 4; in dtls_ec_key_from_uint32_asn1()
395 return buf - buf_orig; in dtls_ec_key_from_uint32_asn1()
525 unsigned char *buf, in dtls_encrypt() argument
540 if (src != buf) in dtls_encrypt()
541 memmove(buf, src, length); in dtls_encrypt()
542 ret = dtls_ccm_encrypt(&ctx->data, src, length, buf, nounce, aad, la); in dtls_encrypt()
551 unsigned char *buf, in dtls_decrypt() argument
566 if (src != buf) in dtls_decrypt()
567 memmove(buf, src, length); in dtls_decrypt()
568 ret = dtls_ccm_decrypt(&ctx->data, src, length, buf, nounce, aad, la); in dtls_decrypt()