From 5275fd2789459c1c633b2436ddb0d352018650d7 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Wed, 10 Apr 2019 10:21:44 -0400 Subject: key_manager: Add equality operator for RSAKeyPair --- src/core/crypto/key_manager.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/crypto/key_manager.h b/src/core/crypto/key_manager.h index 22f268c65..589b25696 100644 --- a/src/core/crypto/key_manager.h +++ b/src/core/crypto/key_manager.h @@ -43,6 +43,13 @@ struct RSAKeyPair { std::array exponent; }; +template +bool operator==(const RSAKeyPair& lhs, + const RSAKeyPair& rhs) { + return std::tie(lhs.encryption_key, lhs.decryption_key, lhs.modulus, lhs.exponent) == + std::tie(rhs.encryption_key, rhs.decryption_key, rhs.modulus, rhs.exponent); +} + enum class KeyCategory : u8 { Standard, Title, -- cgit v1.2.3