I'm having some problems with a piece of code that i'm trying to write where it throws a SignatureException - invalid encoding for signature.
- I declare the Signature as a 'global' variable.
- Before signing the message, I do the following:
sig = Signature.getInstance("DSA");
- When I want to verify the signature, first I do this:
The error is thrown right at the end when I come to the verification:
Anyone understand why I get an invalid coding message and what I should do to fix this?