Total Complexity | 2 |
Total Lines | 9 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import * as crypto from 'crypto'; |
||
3 | |||
4 | export class FileEncryptionAdapter implements IFileEncryption { |
||
5 | public encrypt(buffer: Buffer, password: string): Buffer { |
||
6 | const cipher = crypto.createCipher('aes-256-cbc', password); |
||
7 | |||
8 | return Buffer.concat([cipher.update(buffer), cipher.final()]); |
||
9 | } |
||
10 | |||
11 | public descrypt(filePath: string, password: string) {} |
||
12 | } |
||
13 |