summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-04-10 10:21:44 -0400
committerGravatar Zach Hilman2019-07-07 21:38:33 -0400
commit5275fd2789459c1c633b2436ddb0d352018650d7 (patch)
tree62a7af90b0e8fe1bade335247c6fe03868a021e4 /src/core
parentMerge pull request #2694 from FearlessTobi/patch-1 (diff)
downloadyuzu-5275fd2789459c1c633b2436ddb0d352018650d7.tar.gz
yuzu-5275fd2789459c1c633b2436ddb0d352018650d7.tar.xz
yuzu-5275fd2789459c1c633b2436ddb0d352018650d7.zip
key_manager: Add equality operator for RSAKeyPair
Diffstat (limited to 'src/core')
-rw-r--r--src/core/crypto/key_manager.h7
1 files changed, 7 insertions, 0 deletions
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 {
43 std::array<u8, 4> exponent; 43 std::array<u8, 4> exponent;
44}; 44};
45 45
46template <size_t bit_size, size_t byte_size>
47bool operator==(const RSAKeyPair<bit_size, byte_size>& lhs,
48 const RSAKeyPair<bit_size, byte_size>& rhs) {
49 return std::tie(lhs.encryption_key, lhs.decryption_key, lhs.modulus, lhs.exponent) ==
50 std::tie(rhs.encryption_key, rhs.decryption_key, rhs.modulus, rhs.exponent);
51}
52
46enum class KeyCategory : u8 { 53enum class KeyCategory : u8 {
47 Standard, 54 Standard,
48 Title, 55 Title,