Added color functionality to ZapfDingbatsList:
- new Constructor
- setter
Added reusable methods to DigestAlgorithms that create a MessageDigest instance or create the digest.
Added a digest() method to the ExternalSignature interface. Now you have 2 methods returning a name of an algorithm (hashAlgorithm and encryptionAlgorithm) and 2 methods doing the actual work (digest() and sign()). Important difference: the MessageDigest that creates the hash of the Byte Range will now use the provider passed to the ExternalSignature implementation instead of the provider passed to the signDetached() method!
Replaced almost all instances of MessageDigest.getInstance() in the security package with the convenience method from DigestAlgorithms so that it's easier to see where the MessageDigest class is used.
Use contact name if company name is unavailable
Port from C#: PdfWriter.addSharedObjectsToBody and PdfStamperImp.Close refactored for convenience.
Nobody likes SHA-1 anymore...
When using SunMSCAPI, also create the Hash using the default MessageDigest of the JDK.
Separate the hashing from the signing. This means that it's possible to have different providers for signing and hashing.
You can't always assume that the PdfArray returned by get(PdfName.RECT) is of type PdfRectangle. It could just be a PdfArray object.
The method with the ExternalDigest is useful for some, but not necessary for all.
Get the digest algorithms directly from BC.
It can be interesting to get more info about the timestamp during the timestamping process.
If the ExternalSignature interface not only returns the signing algorithm, but also the provider used for signing, you don't need to pass a provider to the MakeSignature.signDetached() method. I also changed the order of the parameters in signDetached() because hashing is done before signing (that's just a detail).
Creating page events for PdfCopy or PdfSmartCopy doesn't make sense.
Hyphenation wasn't friendly towards unknown characters.
I removed the extra method. You already pass an ExternalSignature, you can as well pass an ExternalDigest instance too.
Use BC to calculate the digests by default.
Use the BC digest directly.
The signature field names come in the order of the revisions.
Second try to fix 'disappearing characters' problem.
Small change to the hyphenation fix: hyphenation of words with unknown chars should now be fixed, while everything else works as before