| 153 | } |
| 154 | |
| 155 | std::pair<PKeyAlgorithm, MessageDigestMethod> getMethod(Algorithm alg) { |
| 156 | if (alg == Algorithm::RS256) { |
| 157 | return { PKeyAlgorithm::RSA, ::EVP_sha256() }; |
| 158 | } else if (alg == Algorithm::ES256) { |
| 159 | return { PKeyAlgorithm::EC, ::EVP_sha256() }; |
| 160 | } else { |
| 161 | return { PKeyAlgorithm::UNSUPPORTED, nullptr }; |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | std::string_view getAlgorithmName(Algorithm alg) { |
| 166 | if (alg == Algorithm::RS256) |
no outgoing calls
no test coverage detected