sign
Signs message with this key.
If the key needs unlocking before use (for example user authentication in any shape or form) and keyUnlockData isn't set or doesn't contain what's needed, KeyLockedException is thrown.
Return
the signature.
Parameters
message
the data to sign.
Throws
if the signature algorithm isn’t compatible with the key.
if the key needs unlocking.
if the key is no longer usable.