Sign and SignVerify Data using an EC Key
To Sign and SignVerify data using an EC key:
Create a NAE Session. Pass the NAE username, password, property file path as arguments.
Create
NaeECIESKey
object. PassNaeSession
object and curve as argument.Curve can be set to
NaeECIESKey.SupportedCurves.brainpoolP256r1_256
Set the Hash algorithm.
Call the
SignData
API and pass input bytes, hashing algorithm name as arguments to get the signed bytes.Call the
VerifyData
API. Pass the signed bytes, input bytes, offset, count, and hashing algorithm name as arguments for the verification of signed data.