signHashData
@NonNull
public static byte[] signHashData(@NonNull
PrivateKey key,
@NonNull
byte[] hashData,
@NonNull
Signature.SignatureDigestAlgorithm algorithm)
throws IOException,
SignatureException,
NoSuchAlgorithmException,
InvalidKeyException
Signs hash data. The method will doing as follows:
1. Encode the object identifier of the digest algorithm and the hash data
in DER format if the SignatureDigestAlgorithm is not NONE.
2. Signed the encoded data with "NONEwithRSA" algorithm.
- Throws:
IOException
SignatureException
NoSuchAlgorithmException
InvalidKeyException