Skip to content

Instantly share code, notes, and snippets.

@GaetanoPiazzolla
Created October 27, 2021 19:14
Show Gist options
  • Save GaetanoPiazzolla/d748a950b97c09f1fb3e145ded63acb8 to your computer and use it in GitHub Desktop.
Save GaetanoPiazzolla/d748a950b97c09f1fb3e145ded63acb8 to your computer and use it in GitHub Desktop.
Signature signature = Signature.getInstance("SHA256withECDSA");
signature.initVerify(key);
signature.update(dataToBeVerified);
coseSignature = ConvertToDer.convertToDer(coseSignature);
if (signature.verify(coseSignature)) {
System.out.println("Verified");
} else {
System.out.println("Not verified");
}
@GaetanoPiazzolla
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment