Sign and SignVerify Data using an RSA Key
To Sign and SignVerify data using an RSA key:
Create a NAE Session. Pass the NAE username, password, property file path as arguments.
Create
NaeRsaKey
object. PassNaeSession
object and keyname as argument.Set the Hash algorithm.
Call the
SignData
API and pass input bytes, hashing algorithm name, and RSASignaturePadding as arguments to get the signed bytes.Call the
VerifyData
API. Pass the signed bytes, input bytes,algorithm name, and RSASignaturePadding as arguments for the verification of signed data.