1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace key 5 { 6 // clang-format off 7 8 enum class SSHKeyType{ 9 Invalid, 10 RSA, 11 DSA, 12 ECDSA, 13 Ed25519, 14 }; 15 16 enum class ECDSACurveType{ 17 Invalid, 18 NISTP256, 19 NISTP384, 20 NISTP521, 21 NISTK163, 22 NISTP192, 23 NISTP224, 24 NISTK233, 25 NISTB233, 26 NISTK283, 27 NISTK409, 28 NISTB409, 29 NISTT571, 30 }; 31 32 enum class KeyType{ 33 Invalid, 34 NVMeoF, 35 SSH, 36 }; 37 38 enum class NVMeoFSecurityProtocolType{ 39 Invalid, 40 DHHC, 41 TLS_PSK, 42 OEM, 43 }; 44 45 enum class NVMeoFSecureHashType{ 46 Invalid, 47 SHA256, 48 SHA384, 49 SHA512, 50 }; 51 52 NLOHMANN_JSON_SERIALIZE_ENUM(SSHKeyType, { 53 {SSHKeyType::Invalid, "Invalid"}, 54 {SSHKeyType::RSA, "RSA"}, 55 {SSHKeyType::DSA, "DSA"}, 56 {SSHKeyType::ECDSA, "ECDSA"}, 57 {SSHKeyType::Ed25519, "Ed25519"}, 58 }); 59 60 NLOHMANN_JSON_SERIALIZE_ENUM(ECDSACurveType, { 61 {ECDSACurveType::Invalid, "Invalid"}, 62 {ECDSACurveType::NISTP256, "NISTP256"}, 63 {ECDSACurveType::NISTP384, "NISTP384"}, 64 {ECDSACurveType::NISTP521, "NISTP521"}, 65 {ECDSACurveType::NISTK163, "NISTK163"}, 66 {ECDSACurveType::NISTP192, "NISTP192"}, 67 {ECDSACurveType::NISTP224, "NISTP224"}, 68 {ECDSACurveType::NISTK233, "NISTK233"}, 69 {ECDSACurveType::NISTB233, "NISTB233"}, 70 {ECDSACurveType::NISTK283, "NISTK283"}, 71 {ECDSACurveType::NISTK409, "NISTK409"}, 72 {ECDSACurveType::NISTB409, "NISTB409"}, 73 {ECDSACurveType::NISTT571, "NISTT571"}, 74 }); 75 76 NLOHMANN_JSON_SERIALIZE_ENUM(KeyType, { 77 {KeyType::Invalid, "Invalid"}, 78 {KeyType::NVMeoF, "NVMeoF"}, 79 {KeyType::SSH, "SSH"}, 80 }); 81 82 NLOHMANN_JSON_SERIALIZE_ENUM(NVMeoFSecurityProtocolType, { 83 {NVMeoFSecurityProtocolType::Invalid, "Invalid"}, 84 {NVMeoFSecurityProtocolType::DHHC, "DHHC"}, 85 {NVMeoFSecurityProtocolType::TLS_PSK, "TLS_PSK"}, 86 {NVMeoFSecurityProtocolType::OEM, "OEM"}, 87 }); 88 89 NLOHMANN_JSON_SERIALIZE_ENUM(NVMeoFSecureHashType, { 90 {NVMeoFSecureHashType::Invalid, "Invalid"}, 91 {NVMeoFSecureHashType::SHA256, "SHA256"}, 92 {NVMeoFSecureHashType::SHA384, "SHA384"}, 93 {NVMeoFSecureHashType::SHA512, "SHA512"}, 94 }); 95 96 } 97 // clang-format on 98