25 {
26
27 using test_k1_recover = std::tuple<std::string, std::string, std::variant<fc::k1_recover_error, bytes>>;
28 const std::vector<test_k1_recover> tests {
29
30 {
31 "1b323dd47a1dd5592c296ee2ee12e0af38974087a475e99098a440284f19c1f7642fa0baa10a8a3ab800dfdbe987dee68a09b6fa3db45a5cc4f3a5835a1671d4dd",
32 "92390316873c5a9d520b28aba61e7a8f00025ac069acd9c4d2a71d775a55fa5f",
33 to_bytes(
"044424982f5c4044aaf27444965d15b53f219c8ad332bf98a98a902ebfb05d46cb86ea6fe663aa83fd4ce0a383855dfae9bf7a07b779d34c84c347fec79d04c51e")
34 },
35
36
37 {
38 "01174de755b55bd29026d626f7313a5560353dc5175f29c78d79d961b81a0c04360d833ca789bc16d4ee714a6d1a19461d890966e0ec5c074f67be67e631d33aa7",
39 "45fd65f6dd062fe7020f11d19fe5c35dc4d425e1479c0968c8e932c208f25399",
41 },
42
43
44 {
45 "174de755b55bd29026d626f7313a5560353dc5175f29c78d79d961b81a0c04360d833ca789bc16d4ee714a6d1a19461d890966e0ec5c074f67be67e631d33aa7",
46 "45fd65f6dd062fe7020f11d19fe5c35dc4d425e1479c0968c8e932c208f25399",
48 },
49
50
51 {
52 "00174de755b55bd29026d626f7313a5560353dc5175f29c78d79d961b81a0c04360d833ca789bc16d4ee714a6d1a19461d890966e0ec5c074f67be67e631d33aa7",
53 "fd65f6dd062fe7020f11d19fe5c35dc4d425e1479c0968c8e932c208f25399",
55 },
56
57 };
58
59 for(const auto& test : tests) {
60
64
67 }
68
fc::sha256 digest(const T &value)
std::variant< k1_recover_error, bytes > k1_recover(const bytes &signature, const bytes &digest)
const unsigned char expected_result[]
bytes to_bytes(const std::string &source)