MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / Verify

Method Verify

src/openrct2/network/NetworkKey.cpp:203–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201 }
202
203 bool Key::Verify(const uint8_t* md, const size_t len, const std::vector<uint8_t>& signature) const
204 {
205 try
206 {
207 auto rsa = Crypt::CreateRSA();
208 return rsa->VerifyData(*_key, md, len, signature.data(), signature.size());
209 }
210 catch (const std::exception& e)
211 {
212 LOG_ERROR("Network::Key::Verify failed: %s", e.what());
213 return false;
214 }
215 }
216} // namespace OpenRCT2::Network
217
218#endif // DISABLE_NETWORK

Callers 1

ServerHandleAuthMethod · 0.80

Calls 5

CreateRSAFunction · 0.50
VerifyDataMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected