aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/mac.h
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2019-05-14 17:01:17 +0200
committerHans Nilsson <[email protected]>2019-06-14 13:33:07 +0200
commit160cea3f655913b370650f93b0c8f6c1bd163e32 (patch)
treee03013d6f39625ac2bac84ddc2cd7b9757328fbb /lib/crypto/c_src/mac.h
parentae4c8e6ee26e3c606054e4a845ac06f95ade1e57 (diff)
downloadotp-160cea3f655913b370650f93b0c8f6c1bd163e32.tar.gz
otp-160cea3f655913b370650f93b0c8f6c1bd163e32.tar.bz2
otp-160cea3f655913b370650f93b0c8f6c1bd163e32.zip
crypto: MAC nif unifying HMAC, CMAC and POLY1305
into one nif using the EVP_DigestSign interface. This enables acceleration if available in lower layers, that is, in cryptolib and lower. However, for older cryptolibs the old HMAC and CMAC low-level interfaces are used, but moved from hmac.c and cmac.c into mac.c.
Diffstat (limited to 'lib/crypto/c_src/mac.h')
-rw-r--r--lib/crypto/c_src/mac.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/crypto/c_src/mac.h b/lib/crypto/c_src/mac.h
new file mode 100644
index 0000000000..00b94a2232
--- /dev/null
+++ b/lib/crypto/c_src/mac.h
@@ -0,0 +1,33 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2010-2018. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * %CopyrightEnd%
+ */
+
+#ifndef E_MAC_H__
+#define E_MAC_H__ 1
+
+#include "common.h"
+
+
+void init_mac_types(ErlNifEnv* env);
+
+ERL_NIF_TERM mac_types_as_list(ErlNifEnv* env);
+
+ERL_NIF_TERM mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+
+#endif /* E_MAC_H__ */