Skip to content

Commit

Permalink
Update native_factory.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinxc authored May 23, 2024
1 parent e810219 commit 83475d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions yacl/crypto/rand/drbg/native_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ namespace yacl::crypto {
NativeDrbg::NativeDrbg(std::string type, bool use_yacl_es, SecParam::C secparam)
: type_(std::move(type)), secparam_(secparam) {
YACL_ENFORCE(use_yacl_es == true);
YACL_ENFORCE(secparam_ == SecParam::C::k128);
drbg_impl_ = std::make_unique<internal::Sm4Drbg>();
auto es = EntropySourceFactory::Instance().Create("auto");
auto nonce = es->GetEntropy(32);
Expand Down

0 comments on commit 83475d9

Please sign in to comment.