Skip to content

icyJoseph/wasm-aes-soft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wasm AES128

Thin wrapper around aes-soft. Implements encrypt and decrypt functions.

Blocks to encode must have length of 16 bytes.

Build

To build, use wasm-pack build.

Using with Deno

After running wasm-pack build, a pkg/ directory is created on your project root.

Inside this directory there's a javascript file wasm_aes_soft_bg.js which starts with:

import * as wasm from "./wasm_aes_soft_bg.wasm";

Replace that line with these lines:

const binary = await Deno.readFile("./wasm_aes_soft_bg.wasm");
const wasmModule = new WebAssembly.Module(binary);
const instance = await WebAssembly.instantiate(wasmModule);
const wasm = instance.exports;

Copy that file together with the wasm_aes_soft_bg.wasm binary to the project where you want to use AES128, and you are good to go!

Credit

This is a thin wrapper around the create aes-soft. All credit goes to their creators.

About

Thin wrapper around aes-soft to use as WASM.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages