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

Method EccSign

CoreLib/Crypto.cpp:41–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40
41bool CryptoUtils::EccSign(uint8_t* data, size_t len, uint8_t* privateKey, uint8_t* signature)
42{
43 uint8_t digest[TC_SHA256_DIGEST_SIZE];
44 if (!SHA256(data, len, digest)) {
45 return false;
46 }
47
48 return uECC_sign(privateKey, digest, sizeof(digest), signature, uECC_secp256r1()) == TC_CRYPTO_SUCCESS;
49}
50
51bool CryptoUtils::SignFile(std::wstring const& zipPath, std::wstring const& privateKeyPath)
52{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected