* Decrypts data. * @param {String|Buffer} data to decrypt * @returns {Object|String} * returns object if data is JSON, else returns string
(data)
| 118 | * returns object if data is JSON, else returns string |
| 119 | */ |
| 120 | decrypt(data) { |
| 121 | if (this.version === '3.4') { |
| 122 | return this._decrypt34(data); |
| 123 | } |
| 124 | |
| 125 | if (this.version === '3.5') { |
| 126 | return this._decrypt35(data); |
| 127 | } |
| 128 | |
| 129 | return this._decryptPre34(data); |
| 130 | } |
| 131 | |
| 132 | /** |
| 133 | * Decrypts data for protocol 3.3 and before |
no test coverage detected