summaryrefslogtreecommitdiff
path: root/include/hw_sha.h
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-04-04 15:44:57 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-04-04 15:44:57 +0200
commitfed029f3c31b7d5df674b5090a13356b631918c7 (patch)
treef1948b23396505a4f5568ab9d37800235b815e0b /include/hw_sha.h
parentbe08abc2429c2e9cbce3d0abc1d315171d683520 (diff)
parent4fdebefa453a58c7b4ca653ab40f7a9791aba6c9 (diff)
downloadu-boot-imx-fed029f3c31b7d5df674b5090a13356b631918c7.zip
u-boot-imx-fed029f3c31b7d5df674b5090a13356b631918c7.tar.gz
u-boot-imx-fed029f3c31b7d5df674b5090a13356b631918c7.tar.bz2
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Diffstat (limited to 'include/hw_sha.h')
-rw-r--r--include/hw_sha.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/hw_sha.h b/include/hw_sha.h
new file mode 100644
index 0000000..264936c
--- /dev/null
+++ b/include/hw_sha.h
@@ -0,0 +1,50 @@
+/*
+ * Header file for SHA hardware acceleration
+ *
+ * Copyright (c) 2012 Samsung Electronics
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef __HW_SHA_H
+#define __HW_SHA_H
+
+
+/**
+ * Computes hash value of input pbuf using h/w acceleration
+ *
+ * @param in_addr A pointer to the input buffer
+ * @param bufleni Byte length of input buffer
+ * @param out_addr A pointer to the output buffer. When complete
+ * 32 bytes are copied to pout[0]...pout[31]. Thus, a user
+ * should allocate at least 32 bytes at pOut in advance.
+ * @param chunk_size chunk size for sha256
+ */
+void hw_sha256(const uchar * in_addr, uint buflen,
+ uchar * out_addr, uint chunk_size);
+
+/**
+ * Computes hash value of input pbuf using h/w acceleration
+ *
+ * @param in_addr A pointer to the input buffer
+ * @param bufleni Byte length of input buffer
+ * @param out_addr A pointer to the output buffer. When complete
+ * 32 bytes are copied to pout[0]...pout[31]. Thus, a user
+ * should allocate at least 32 bytes at pOut in advance.
+ * @param chunk_size chunk_size for sha1
+ */
+void hw_sha1(const uchar * in_addr, uint buflen,
+ uchar * out_addr, uint chunk_size);
+#endif