summaryrefslogtreecommitdiff
path: root/chip/host/dcrypto/sha256.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/host/dcrypto/sha256.c')
-rw-r--r--chip/host/dcrypto/sha256.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/chip/host/dcrypto/sha256.c b/chip/host/dcrypto/sha256.c
new file mode 100644
index 0000000000..429588c8ac
--- /dev/null
+++ b/chip/host/dcrypto/sha256.c
@@ -0,0 +1,18 @@
+/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "dcrypto.h"
+
+void DCRYPTO_SHA256_init(LITE_SHA256_CTX *ctx, uint32_t sw_required)
+{
+ SHA256_init(ctx);
+}
+
+const uint8_t *DCRYPTO_SHA256_hash(const void *data, uint32_t n,
+ uint8_t *digest)
+{
+ SHA256_hash(data, n, digest);
+ return digest;
+}