# Class: OnePassSignaturePacket

## OnePassSignaturePacket()

Implementation of the One-Pass Signature Packets (Tag 4)

RFC4880 5.4: The One-Pass Signature packet precedes the signed data and contains enough information to allow the receiver to begin calculating any hashes needed to verify the signature. It allows the Signature packet to be placed at the end of the message, so that the signer can compute the entire signed message in one pass.

## Constructor

#### new OnePassSignaturePacket()

Source:
  - packet/one_pass_signature.js, line 35

### Members

#### flags

A one-octet number holding a flag showing whether the signature is nested. A zero value indicates that the next packet is another One-Pass Signature packet that describes another signature to be applied to the same message data.

Source:
  - packet/one_pass_signature.js, line 88

#### hashAlgorithm :enums.hash

A one-octet number describing the hash algorithm used.

##### Type:

- enums.hash

Source:
  - packet/one_pass_signature.js, line 70
See:
  - RFC4880 9.4

#### issuerFingerprint

Only for v6 packets, 32 octets of the fingerprint of the signing key.

Source:
  - packet/one_pass_signature.js, line 82

#### issuerKeyID

Only for v3 packets, an eight-octet number holding the Key ID of the signing key.

Source:
  - packet/one_pass_signature.js, line 80

#### publicKeyAlgorithm :enums.publicKey

A one-octet number describing the public-key algorithm used.

##### Type:

- enums.publicKey

Source:
  - packet/one_pass_signature.js, line 76
See:
  - RFC4880 9.1

#### salt

Only for v6, a variable-length field containing the salt.

Source:
  - packet/one_pass_signature.js, line 78

#### signatureType :enums.signature

A one-octet signature type. Signature types are described in RFC4880 Section 5.2.1.

##### Type:

- enums.signature

Source:
  - packet/one_pass_signature.js, line 64

#### version

A one-octet version number. The current versions are 3 and 6.

Source:
  - packet/one_pass_signature.js, line 56

### Methods

#### read(bytes) → {OnePassSignaturePacket}

parsing function for a one-pass signature packet (tag 4).

##### Parameters:

Name | Type | Description
--- | --- | ---
`bytes` | Uint8Array | Payload of a tag 4 packet

Source:
  - packet/one_pass_signature.js, line 96

##### Returns:

Object representation.

Type
  OnePassSignaturePacket

#### write() → {Uint8Array}

creates a string representation of a one-pass signature packet

Source:
  - packet/one_pass_signature.js, line 151

##### Returns:

A Uint8Array representation of a one-pass signature packet.

Type
  Uint8Array