mimedata

Contains the actual data associated with a data item or a signature item. It can be binary data or the contents of an enclosed file.

The data is encoded in base64 format, so that even forms containing binary data can be viewed in a text editor. When the data is needed by the form, it is decoded automatically from base64 back to its native format.

Data may also be compressed before base64 encoding, allowing an item to store a larger block of data.

About MIME data in signature items

The MIME data contains the contents of a signature. An XFDL generator must create it as follows:

  1. Using the signature filter instructions in the associated signature button, create a plain text version of the form or portion of the form to be signed.
  2. Using the instructions in the signature button's signformat option, create a hash of the plain text description.
  3. sign the hash with the signer's private key.
  4. Include a binary representation of the signature (as generated by the signature engine) in the mimedata option.

Syntax

   <mimedata encoding="format">MIME data</mimedata>
Table 1. mimedata parameters
Parameter Type Description
format string The format in which to encode the data. Valid formats are:
  • base64 – A base 64 textual representation of the data.
  • base64-gzip – A base 64 textual representation of the data after it has been gzip compressed.
MIME data string The binary data or enclosed file contents.

Available in

data, signature

Example

This sample assigns some encoded data to the mimedata option:

   <mimedata encoding="base64-gzip">
      R0lGODdhYABPAPAAAP///wAAACwAAAAAYABPAAAC/4SPqcvtD02Y
      Art68+Y7im7ku2KkzXnOzh9v7qNw+k+TbDoLFTvCSPzMrS2YzmTE
   </mimedata>

This sample shows a mimedata option in a digital signature:

   <signature sid="empsignature">
      <signformat>application/vnd.xfdl</signformat>
      <signer>Jane D Smith, jsmith@insurance.com</signer>
      <signature>Page1.empsignature</signature>
      <signitemrefs>
         <filter>omit</filter>
         <itemref>Page1.mgrSigButton</itemref>
         <itemref>Page1.admSigButton</itemref>
         <itemref>Page1.empsignature</itemref>
         <itemref>Page1.mgrsignature</itemref>
         <itemref>Page1.admsignature</itemref>
      </signitemrefs>
   <!-- The items listed MUST have itemlocation
     options with absolute and extent as the last
     settings in order for the filter to
     be sufficient in terms of security -->
      <signoptionrefs>
         <filter>keep</filter>
         <optionref>PAGE1.mgrSigButton.itemlocation</optionref>
         <optionref>PAGE1.admSigButton.itemlocation</optionref>
         <optionref>PAGE1.empsignature.itemlocation</optionref>
         <optionref>PAGE1.mgrsignature.itemlocation</optionref>
         <optionref>PAGE1.admsignature.itemlocation</optionref>
      </signoptionrefs>
      <signoptions>
         <filter>omit</filter>
         <optiontype>triggeritem</optiontype>
         <optiontype>coordinates</optiontype>
      </signoptions>
      <mimedata encoding="base64">
         MIIFMgYJKoZIhvcNACooIIFIzCCBR8CAQExDzANBgkgAQUFADA
         LB\ngkqhkiG9w0BBwGgggQZMCA36gAwSRiADjdhfHJl6hMrc5D
         ySSP+X5j\nANfBGSOI\n9w0BAQQwDwYDVQQHEwhJbmRlcm5lqw
         dDEXMBUGA1UEChM\nOVmVyaVNpZ24sIEluYy4xNDAKnqweaftn
         1ZlcmlTaWduIENsYXNzIDEgQ0Eg\nLSJbmRdWFsIFN1YnNjcml
         iyZXIwHhcNOTgwMTI3MwMDAwOTgwM\M1OTU5WjCCARExETA
      </mimedata>
   </signature>

Usage details

  1. Default: none
  2. Base64 encoding transforms the data into a format that can be processed easily by text editors, e-mail applications, and so on. Converting data to base64 format ensures the resulting string contains no characters requiring an escape sequence.
  3. Base64-gzip encoding compresses the data before transforming it to base64 format.
  4. For signatures: because the signer's public key is included in the MIME data, a subsequent program can verify a signature without requiring that the signer's key be previously installed.
  5. For signatures: the mimedata option in a signature item is always omitted from the signature represented by that item, regardless of the signature filters in use. This is done because the mimedata is not populated with the signature information until after the signature has been applied. (In other words, the signature can't include itself because it hasn't been generated yet.)
  6. For signatures: the mimedata option in a data item used to store a signature image (see signatureimage option) is always omitted from the signature represented by that image, regardless of the signature filters in use. This is done because the mimedata is not populated with the signature image until after the signature has been applied. (In other words, the signature can't include its own image because it hasn't been added to the form yet.)
  7. For information about supported images formats, see image.