I am trying to sign a token object using SHA1. I am using bouncycastle as the security provider. Whenever the program tries to sign something it gives me this error.
java.security.SignatureException: java.lang.IllegalArgumentException: input data too large.
What is the maximum size for signing something? Do you have any suggestions about how I can sign this object?
The input size is limited to the size of the key. If you use a 1024 bit key, you are limited to 128 bytes.
Typically, you are signing the digest (hash value), not the actual data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With