Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 42x 42x 41x 41x 42x 12x 12x 42x 3x 3x 42x 3x 3x | import { createCipher } from './create-cipher'; export * from './get-crypto'; export async function aes256CbcEncrypt( iv: Uint8Array, key: Uint8Array, plaintext: Uint8Array ): Promise<Uint8Array> { const cipher = await createCipher(); return cipher.encrypt('aes-256-cbc', key, iv, plaintext); } export async function aes256CbcDecrypt( iv: Uint8Array, key: Uint8Array, ciphertext: Uint8Array ): Promise<Uint8Array> { const cipher = await createCipher(); return cipher.decrypt('aes-256-cbc', key, iv, ciphertext); } export async function aes128CbcEncrypt( iv: Uint8Array, key: Uint8Array, plaintext: Uint8Array ): Promise<Uint8Array> { const cipher = await createCipher(); return cipher.encrypt('aes-128-cbc', key, iv, plaintext); } export async function aes128CbcDecrypt( iv: Uint8Array, key: Uint8Array, ciphertext: Uint8Array ): Promise<Uint8Array> { const cipher = await createCipher(); return cipher.decrypt('aes-128-cbc', key, iv, ciphertext); } |