Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
RSARawVerifier: use std::memcmp. References #499
Browse files Browse the repository at this point in the history
Project prerogative to use libstdc++ (and/or STL) when possible.
  • Loading branch information
anonimal committed Dec 12, 2016
1 parent 7233398 commit d7204bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/crypto/impl/cryptopp/signature.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

#include <array>
#include <cstdint>
#include <cstring>
#include <memory>
#include <vector>

Expand Down Expand Up @@ -784,7 +785,7 @@ class RSARawVerifier {
if (buf.size() < Hash::DIGESTSIZE)
return false; // Can't verify digest longer than key
// We assume digest is right aligned, at least for PKCS#1 v1.5 padding
return !memcmp(
return !std::memcmp(
buf.data() + (buf.size() - Hash::DIGESTSIZE),
digest.data(),
Hash::DIGESTSIZE);
Expand Down

0 comments on commit d7204bf

Please sign in to comment.