mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 04:46:27 -05:00
key_manager: Add equality operator for RSAKeyPair
This commit is contained in:
parent
8070cb3f6b
commit
5275fd2789
1 changed files with 7 additions and 0 deletions
|
@ -43,6 +43,13 @@ struct RSAKeyPair {
|
||||||
std::array<u8, 4> exponent;
|
std::array<u8, 4> exponent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <size_t bit_size, size_t byte_size>
|
||||||
|
bool operator==(const RSAKeyPair<bit_size, byte_size>& lhs,
|
||||||
|
const RSAKeyPair<bit_size, byte_size>& 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 {
|
enum class KeyCategory : u8 {
|
||||||
Standard,
|
Standard,
|
||||||
Title,
|
Title,
|
||||||
|
|
Loading…
Reference in a new issue