fix: support files that were not encrypted (e.g. kgma), close #36

This commit is contained in:
鲁树人
2023-06-18 18:00:31 +01:00
parent 756225d462
commit e18e42ae9a
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import type { CryptoBase } from '../CryptoBase';
export class TransparentCrypto implements CryptoBase {
cryptoName = 'Transparent';
checkByDecryptHeader = true;
async decrypt(buffer: ArrayBuffer): Promise<Blob> {
return new Blob([buffer]);
}
public static make() {
return new TransparentCrypto();
}
}