Function lcxx::crypto::verify_signature

Function Documentation

auto lcxx::crypto::verify_signature(std::string_view const reference, std::vector<std::byte> const &signature, rsa_key_t const public_key) -> bool

takes a reference string, a corresponding signature and a public key to verify if the signature matches that reference string

Parameters:
  • reference – the input data that was used to create the signature

  • signature – the signature that is checked against the reference data

  • public_key – the public RSA key corresponding to the one used for the signature

Returns:

true if the signature matches the reference string, given the loaded public key

Returns:

false if signature and reference string do not match, given the loaded public key