# Module: packet/sym_encrypted_integrity_protected

## packet/sym_encrypted_integrity_protected

#### new require("packet/sym_encrypted_integrity_protected")()

  Source:
    - packet/sym_encrypted_integrity_protected.js, line 35

Source:
  - packet/sym_encrypted_integrity_protected.js, line 18

### Members

#### encrypted

  The encrypted payload.
  Source:
    - packet/sym_encrypted_integrity_protected.js, line 37

#### modification :Boolean

  If after decrypting the packet this is set to true, a modification has been detected and thus the contents should be discarded.

  ##### Type:

  - Boolean
  Source:
    - packet/sym_encrypted_integrity_protected.js, line 44

### Methods

#### decrypt(sessionKeyAlgorithm, key) → {String}

  Decrypts the encrypted data contained in this object read_packet must have been called before

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `sessionKeyAlgorithm` | Integer | The selected symmetric encryption algorithm to be used
  `key` | String | The key of cipher blocksize length to be used

  Source:
    - packet/sym_encrypted_integrity_protected.js, line 101

  ##### Returns:

  The decrypted data of this packet
  Type
    String