Home Reference Source

src/crypt/aes-crypto.js

  1. export default class AESCrypto {
  2. constructor (subtle, iv) {
  3. this.subtle = subtle;
  4. this.aesIV = iv;
  5. }
  6.  
  7. decrypt (data, key) {
  8. return this.subtle.decrypt({ name: 'AES-CBC', iv: this.aesIV }, key, data);
  9. }
  10. }