Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose HMAC through the Public C++ Crypto API #4204

Merged
merged 3 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/build_apps/crypto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Hashing
.. doxygenfunction:: crypto::sha256(const std::vector<uint8_t> &data)
:project: CCF

.. doxygenfunction:: crypto::hmac(MDType, const std::vector<uint8_t>&, const std::vector<uint8_t>&)
:project: CCF

.. doxygenClass:: crypto::HashProvider
:project: CCF
:members:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/crypto/hmac.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache 2.0 License.
#include "hmac.h"
#include "ccf/crypto/hmac.h"

#include "crypto/openssl/hash.h"

Expand Down
2 changes: 1 addition & 1 deletion src/crypto/test/bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "ccf/crypto/base64.h"
#include "ccf/crypto/entropy.h"
#include "ccf/crypto/hash_provider.h"
#include "ccf/crypto/hmac.h"
#include "ccf/crypto/key_pair.h"
#include "ccf/crypto/sha256.h"
#include "ccf/crypto/symmetric_key.h"
#include "crypto/hmac.h"
#include "crypto/openssl/base64.h"
#include "crypto/openssl/hash.h"
#include "crypto/openssl/key_pair.h"
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/test/crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "ccf/crypto/base64.h"
#include "ccf/crypto/entropy.h"
#include "ccf/crypto/hmac.h"
#include "ccf/crypto/key_pair.h"
#include "ccf/crypto/key_wrap.h"
#include "ccf/crypto/rsa_key_pair.h"
#include "ccf/crypto/symmetric_key.h"
#include "ccf/crypto/verifier.h"
#include "crypto/certs.h"
#include "crypto/csr.h"
#include "crypto/hmac.h"
#include "crypto/openssl/key_pair.h"
#include "crypto/openssl/rsa_key_pair.h"
#include "crypto/openssl/symmetric_key.h"
Expand Down
2 changes: 1 addition & 1 deletion src/kv/encryptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the Apache 2.0 License.
#pragma once

#include "crypto/hmac.h"
#include "ccf/crypto/hmac.h"
#include "kv/kv_types.h"

#include <algorithm>
Expand Down
2 changes: 1 addition & 1 deletion src/node/ledger_secret.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#pragma once

#include "ccf/crypto/entropy.h"
#include "ccf/crypto/hmac.h"
#include "ccf/crypto/symmetric_key.h"
#include "crypto/hmac.h"
#include "kv/kv_types.h"
#include "service/tables/secrets.h"
#include "service/tables/shares.h"
Expand Down