* Returns true when a specific document in a specific table should be * encrypted. The 'data' table is selective: only _id === 'userConfig'.
(dbName, id)
| 79 | * encrypted. The 'data' table is selective: only _id === 'userConfig'. |
| 80 | */ |
| 81 | function needsEnc (dbName, id) { |
| 82 | if (!enc) return false |
| 83 | if (dbName === 'data') return id === DATA_ENC_ID |
| 84 | return ENC_TABLES.has(dbName) |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Wrap a result document by decrypting its `data` field when needed. |
no outgoing calls
no test coverage detected