I have an XML file that is in this format:
<root>
Test string
<Signature>
WvZUJAJ/3QNqzQvwne2vvy7U5Pck8ZZ5UTa6pIwR7GE+PoGi6A1kyw==</Signature>
</root>
I was able to produce the SHA256 and produced a string by using the following:
string CalculateSHA256(const string& input)
{
SHA256 hash;
string digest;
StringSource _(input, true, new HashFilter(hash, new HexEncoder (new StringSink(digest))));
return digest;
}
In the documentation I have it mentions that a signature can be verified by using PKCS, SHA256, and a public key. I have the public key and like i mentioned about SHA256, but I cannot find a way to produce the signature. I have the string of what I SHOULD be, but im trying to verify it was correctly produced.
The methods that I've tried have produced signatures with random non ascii characters. Any help would be great. Thanks!