7 static const std::map<folly::StringPiece, CipherSuite> stringToCiphers = {
10 {
"TLS_CHACHA20_POLY1305_SHA256",
12 {
"TLS_AES_128_OCB_SHA256_EXPERIMENTAL",
15 auto location = stringToCiphers.find(s);
16 if (location != stringToCiphers.end()) {
17 return location->second;
20 throw std::runtime_error(folly::to<std::string>(
"Unknown cipher suite: ", s));
25 static const std::map<folly::StringPiece, NamedGroup> stringToGroups = {
28 auto location = stringToGroups.find(s);
29 if (location != stringToGroups.end()) {
30 return location->second;
33 throw std::runtime_error(folly::to<std::string>(
"Unknown named group: ", s));
static Param parse(Buf handshakeMsg, Buf original)