Skip to content

Commit

Permalink
Updated deps, libsodium, memory checks added everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzc0re committed Sep 13, 2023
1 parent 9876d6e commit 8a47f32
Show file tree
Hide file tree
Showing 34 changed files with 1,191 additions and 737 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout
uses: actions/checkout@master
with:
submodules: 'true'
submodules: "true"

- name: Cache LLVM and Clang
id: cache-llvm
Expand All @@ -35,11 +35,11 @@ jobs:
uses: mymindstorm/setup-emsdk@v11
with:
# Make sure to set a version number!
version: 3.1.44
version: 3.1.45
# This is the name of the cache folder.
# The cache folder will be placed in the build directory,
# so make sure it doesn't conflict with anything!
actions-cache-folder: 'emsdk-cache'
actions-cache-folder: "emsdk-cache"
update: true

- name: Verify
Expand All @@ -65,19 +65,19 @@ jobs:
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
node-version: "18.x"
registry-url: "https://registry.npmjs.org"

- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}

# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@deliberative'
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
scope: "@deliberative"

- name: Publish on github
run: npm publish
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout
uses: actions/checkout@master
with:
submodules: 'true'
submodules: "true"

- name: Cache LLVM and Clang
id: cache-llvm
Expand All @@ -35,11 +35,11 @@ jobs:
uses: mymindstorm/setup-emsdk@v11
with:
# Make sure to set a version number!
version: 3.1.44
version: 3.1.45
# This is the name of the cache folder.
# The cache folder will be placed in the build directory,
# so make sure it doesn't conflict with anything!
actions-cache-folder: 'emsdk-cache'
actions-cache-folder: "emsdk-cache"
update: true

- name: Verify
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ We have the `-s SINGLE_FILE=1` option for the `emcc` compiler, which converts th
that will be compiled by the glue js code into a WebAssembly module. This was done for the purpose of interoperability
and modularity.

Clone the repo, download the libsodium submodule and install packages:

```
git clone https://github.com/deliberative/crypto.git
git submodule init
git submodule update
npm i
```
Once you have all the dependencies installed, you can run

```
Expand Down
5 changes: 2 additions & 3 deletions __tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ describe("Starting the cryptographic random utils test suite.", () => {

test("Random shuffling of array works.", async () => {
const arrayOneElement = [1];
const arrayOneElementShuffled = await dcrypto.arrayRandomShuffle(
arrayOneElement,
);
const arrayOneElementShuffled =
await dcrypto.arrayRandomShuffle(arrayOneElement);
expect(arrayOneElement[0] === arrayOneElementShuffled[0]).toBe(true);

const someArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
Expand Down
2 changes: 1 addition & 1 deletion libsodium
Submodule libsodium updated 137 files
Loading

0 comments on commit 8a47f32

Please sign in to comment.