2 * Code copied from openssl distribution and
3 * Modified just enough so that compiles and runs standalone
5 * Copyright (C) 2012, Broadcom Corporation. All Rights Reserved.
7 * Permission to use, copy, modify, and/or distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
14 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
16 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
17 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 * $Id: hmac_sha256.h 241182 2011-02-17 21:50:03Z $
21 /* ====================================================================
22 * Copyright (c) 2004 The OpenSSL Project. All rights reserved
23 * according to the OpenSSL license [found in ../../LICENSE].
24 * ====================================================================
26 void hmac_sha256(const void *key
, int key_len
,
27 const unsigned char *text
, size_t text_len
,
28 unsigned char *digest
,
29 unsigned int *digest_len
);
30 void hmac_sha256_n(const void *key
, int key_len
,
31 const unsigned char *text
, size_t text_len
,
32 unsigned char *digest
,
33 unsigned int digest_len
);
34 void sha256(const unsigned char *text
, size_t text_len
, unsigned char *digest
,
35 unsigned int digest_len
);
37 KDF(unsigned char *key
, int key_len
, unsigned char *prefix
,
38 int prefix_len
, unsigned char *data
, int data_len
,
39 unsigned char *output
, int len
);