# Class: CleartextMessage

## cleartext~ CleartextMessage

Class that represents an OpenPGP cleartext signed message. See http://tools.ietf.org/html/rfc4880#section-7

#### new CleartextMessage(text, packetlist)

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `text` | String | The cleartext of the signed message
  `packetlist` | module:packet/packetlist | The packetlist with signature packets or undefined if message not yet signed

  Source:
    - cleartext.js, line 34

### Methods

#### armor() → {String}

  Returns ASCII armored text of cleartext signed message
  Source:
    - cleartext.js, line 116

  ##### Returns:

  ASCII armor
  Type
    String

#### getSigningKeyIds() → {Array.<module:type/keyid>}

  Returns the key IDs of the keys that signed the cleartext message
  Source:
    - cleartext.js, line 47

  ##### Returns:

  array of keyid objects
  Type
    Array.<module:type/keyid>

#### getText() → {String}

  Get cleartext
  Source:
    - cleartext.js, line 107

  ##### Returns:

  cleartext of message
  Type
    String

#### sign(privateKeys)

  Sign the cleartext message

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `privateKeys` | Array.<module:key~Key> | private keys with decrypted secret key data for signing

  Source:
    - cleartext.js, line 60

#### verify(publicKeys) → {Array.<{keyid: module:type/keyid, valid: Boolean}>}

  Verify signatures of cleartext signed message

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `publicKeys` | Array.<module:key~Key> | public keys to verify signatures

  Source:
    - cleartext.js, line 82

  ##### Returns:

  list of signer's keyid and validity of signature
  Type
    Array.<{keyid: module:type/keyid, valid: Boolean}>