// rf. RFC822
MimeHeaderCanonicalizer mHCanonicalizer = CanonicalizerFactory.getMimeHeaderCanonicalizer("US-ASCII");
byte[] outputHeaderBytes = mHCanonicalizer._canonicalize( ((AttachmentSignatureInput)input).getMimeHeaders().iterator());
Canonicalizer canonicalizer =
CanonicalizerFactory.
getCanonicalizer(((AttachmentSignatureInput)input).getContentType());
byte[] outputContentBytes = canonicalizer.canonicalize(inputContentBytes);
byte[] outputBytes = new byte[outputHeaderBytes.length+outputContentBytes.length];
System.arraycopy(outputHeaderBytes, 0, outputBytes, 0, outputHeaderBytes.length);
System.arraycopy(outputContentBytes, 0, outputBytes,
outputHeaderBytes.length, outputContentBytes.length);