(key: Uint8Array, variant: 'legacy' | 'dataKey', data: Uint8Array)
| 152 | } |
| 153 | |
| 154 | export function decrypt(key: Uint8Array, variant: 'legacy' | 'dataKey', data: Uint8Array): any | null { |
| 155 | if (variant === 'legacy') { |
| 156 | return decryptLegacy(data, key); |
| 157 | } else { |
| 158 | return decryptWithDataKey(data, key); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | * Generate authentication challenge response |
no test coverage detected