# elv-crypto

ES6 JavaScript library of crypto functionality for the Eluvio content platform.
High-performance is achieved through use of WebAssembly.

## Build

npm builds: https://www.npmjs.com/package/@eluvio/crypto

We provide bundles for convenience in the "dist" directory. However, developers
should link directly against "src" when using their own packagers.

## Examples

Look inside the "scripts" and "test" directories.

## Test

### Unit Tests

```shell
npm run test
```

### Build Test

Navigate a browser to test/testLoadBuild.html after starting a local HTTP server:

```shell
http-server -p 80 --cors .
```

Load in Node.js:

```shell
node test/testLoadBuild.cjs
```

## TODO

- Maybe now Web APIs could replace our use of Node streams and crypto
- Test memory model
  - If return values persist or not as expected
  - If long term memory usage is stable
- Performance tests
