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

Method Sign

src/openrct2/network/NetworkKey.cpp:188–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186 }
187
188 bool Key::Sign(const uint8_t* md, const size_t len, std::vector<uint8_t>& signature) const
189 {
190 try
191 {
192 auto rsa = Crypt::CreateRSA();
193 signature = rsa->SignData(*_key, md, len);
194 return true;
195 }
196 catch (const std::exception& e)
197 {
198 LOG_ERROR("Network::Key::Sign failed: %s", e.what());
199 return false;
200 }
201 }
202
203 bool Key::Verify(const uint8_t* md, const size_t len, const std::vector<uint8_t>& signature) const
204 {

Callers 2

Client_Handle_TOKENMethod · 0.80
SendPasswordFunction · 0.80

Calls 3

CreateRSAFunction · 0.50
SignDataMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected