-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: - remove the `openssl::<Hash>` types (Hash=Sha256, Sha384, Sha512) - create `openssl::Hasher` template - use that template in `openssl::Properties<Hash>` - change dependencies from `fizz::openssl::Hash` to either `fizz::Hash` or `fizz::openssl::Hasher<fizz::Hash>` Main changes are in: fbcode/fizz/backend/openssl/Hasher.h fbcode/fizz/backend/TARGETS fizz/backend/openssl/crypto/Sha256.h fizz/backend/openssl/crypto/Sha384.h fizz/backend/openssl/crypto/Sha512.h The rest are dependency changes. Reviewed By: mingtaoy Differential Revision: D55905248 fbshipit-source-id: 2dd71b6d26990d963e45e100750be1d326cb1336
- Loading branch information
1 parent
43a4594
commit ae2728a
Showing
40 changed files
with
177 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2018-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <fizz/backend/openssl/crypto/Sha.h> | ||
#include <fizz/backend/openssl/crypto/Sha256.h> | ||
#include <fizz/backend/openssl/crypto/Sha384.h> | ||
#include <fizz/backend/openssl/crypto/Sha512.h> | ||
#include <folly/Range.h> | ||
|
||
namespace fizz::openssl { | ||
template <typename T> | ||
struct HasherType { | ||
static constexpr size_t HashLen = T::HashLen; | ||
static constexpr folly::StringPiece BlankHash = T::BlankHash; | ||
static constexpr auto HashEngine = Properties<T>::HashEngine; | ||
}; | ||
|
||
template <class T> | ||
using Hasher = Sha<HasherType<T>>; | ||
} // namespace fizz::openssl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.