all files / fontkit/src/tables/ DSIG.coffee

100% Statements 4/4
100% Branches 0/0
100% Functions 0/0
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18                            
r = require 'restructure'
 
Signature = new r.Struct
  format: r.uint32
  length: r.uint32
  offset: r.uint32
 
SignatureBlock = new r.Struct
  reserved:       new r.Reserved(r.uint16, 2)
  cbSignature:    r.uint32  # Length (in bytes) of the PKCS#7 packet in pbSignature
  signature:      new r.Buffer('cbSignature')
 
module.exports = new r.Struct
  ulVersion:       r.uint32  # Version number of the DSIG table (0x00000001)
  usNumSigs:       r.uint16  # Number of signatures in the table
  usFlag:          r.uint16  # Permission flags
  signatures:      new r.Array(Signature, 'usNumSigs')
  signatureBlocks: new r.Array(SignatureBlock, 'usNumSigs')