dtls_p_hash method

int dtls_p_hash(
  1. int h,
  2. Pointer<Uint8> key,
  3. int keylen,
  4. Pointer<Uint8> label,
  5. int labellen,
  6. Pointer<Uint8> random1,
  7. int random1len,
  8. Pointer<Uint8> random2,
  9. int random2len,
  10. Pointer<Uint8> buf,
  11. int buflen,
)

Expands the secret and key to a block of DTLS_HMAC_MAX size according to the algorithm specified in section 5 of RFC 4346.

\param h Identifier of the hash function to use. \param key The secret. \param keylen Length of \p key. \param seed The seed. \param seedlen Length of \p seed. \param buf Output buffer where the result is XORed into The buffe must be capable to hold at least \p buflen bytes. \return The actual number of bytes written to \p buf or 0 on error.

Implementation

int dtls_p_hash(
  int h,
  ffi.Pointer<ffi.Uint8> key,
  int keylen,
  ffi.Pointer<ffi.Uint8> label,
  int labellen,
  ffi.Pointer<ffi.Uint8> random1,
  int random1len,
  ffi.Pointer<ffi.Uint8> random2,
  int random2len,
  ffi.Pointer<ffi.Uint8> buf,
  int buflen,
) {
  return _dtls_p_hash(
    h,
    key,
    keylen,
    label,
    labellen,
    random1,
    random1len,
    random2,
    random2len,
    buf,
    buflen,
  );
}