This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts"> | |
import { nanoid } from "nanoid"; | |
export let disabled: boolean = false; | |
export let title: string = 'CHOOSE FILES' | |
export let variant: 'confirm' | 'cancel' | 'normal' = "normal"; | |
export let id: string = nanoid(); // or any other way to generate a unique id like Math.random().toString() | |
export const multiple: boolean = false; | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Readable } from "stream"; | |
import { CryptoAesCBC } from "./crypt"; | |
import { AesDecryptStream, AesEncryptStream } from "./cryptostream"; | |
import { ReadableStream, WritableStream } from "stream/web"; | |
describe("Decrypt", () => { | |
it("shoud decrypt file below 16 bits", async () => { | |
const buf = Buffer.alloc(12); // Creating a new Buffer | |
buf.write("Hello world!"); | |
const crypto = new CryptoAesCBC('testkey'); |