MCPcopy Create free account
hub / github.com/Norbyte/bg3se / EccVerify

Method EccVerify

CoreLib/Crypto.cpp:30–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29
30bool CryptoUtils::EccVerify(uint8_t* data, size_t len, uint8_t* publicKey, uint8_t* signature)
31{
32 uint8_t digest[TC_SHA256_DIGEST_SIZE];
33 if (!SHA256(data, len, digest)) {
34 return false;
35 }
36
37 return uECC_verify(publicKey, digest, sizeof(digest), signature, uECC_secp256r1()) == TC_CRYPTO_SUCCESS;
38}
39
40
41bool CryptoUtils::EccSign(uint8_t* data, size_t len, uint8_t* privateKey, uint8_t* signature)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected