X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=prf_tls12%2Fprf_tls12.h;fp=prf_tls12%2Fprf_tls12.h;h=759580d3adaffb7464b442cbf28e060ddf58f383;hb=b9d6e1eb867eaa431c4c555a7409342805fa2706;hp=0000000000000000000000000000000000000000;hpb=1ee55d2589fee6c40acb72a24c04528a8cc1772f;p=arm-crypto-lib.git
diff --git a/prf_tls12/prf_tls12.h b/prf_tls12/prf_tls12.h
new file mode 100644
index 0000000..759580d
--- /dev/null
+++ b/prf_tls12/prf_tls12.h
@@ -0,0 +1,48 @@
+/* prf_tls12.h */
+/*
+ This file is part of the AVR-Crypto-Lib.
+ Copyright (C) 2011 Daniel Otte (daniel.otte@rub.de)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifndef PRF_TLS12_H_
+#define PRF_TLS12_H_
+
+#include
+#include
+#include
+#include
+
+typedef struct{
+ hfhmacgen_ctx_t mainctx;
+ uint16_t blocklength_b;
+ uint16_t bufferlength_b;
+ uint8_t* seed_buffer;
+} prf_tls12_ctx_t;
+
+uint8_t prf_tls12_init(prf_tls12_ctx_t* ctx, const hfdesc_t* hash,
+ const void* key, uint16_t keylength_b,
+ const void* seed, uint16_t seedlength_b);
+
+uint8_t prf_tls12_init_w_label(prf_tls12_ctx_t* ctx, const hfdesc_t* hash,
+ const void* key, uint16_t keylength_b,
+ const void* label, uint16_t labellength_B,
+ const void* seed, uint16_t seedlength_b);
+
+void prf_tls12_free(prf_tls12_ctx_t* ctx);
+uint8_t prf_tls12_next(void* dest, prf_tls12_ctx_t* ctx);
+
+
+#endif /* PRF_TLS12_H_ */