Get method code (used for codec, to understand which one we are using)
| 53 | |
| 54 | /// Get method code (used for codec, to understand which one we are using) |
| 55 | uint8_t getMethodCode(EncryptionMethod Method) |
| 56 | { |
| 57 | if (Method == AES_128_GCM_SIV) |
| 58 | return static_cast<uint8_t>(CompressionMethodByte::AES_128_GCM_SIV); |
| 59 | if (Method == AES_256_GCM_SIV) |
| 60 | return static_cast<uint8_t>(CompressionMethodByte::AES_256_GCM_SIV); |
| 61 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown encryption method. Got {}", getMethodName(Method)); |
| 62 | } |
| 63 | |
| 64 | } // end of namespace |
| 65 |
no test coverage detected