diff --git a/.gitignore b/.gitignore
index 49b1e983..910f6339 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,48 +1,8 @@
-docs
-package-lock.json
-yarn.lock
-
-**/node_modules/
-**/*.log
-test/repo-tests*
-**/bundle.js
-
-# Logs
-logs
-*.log
-
-coverage
-.coverage
-
-# Runtime data
-pids
-*.pid
-*.seed
-
-# Directory for instrumented libs generated by jscoverage/JSCover
-lib-cov
-
-# Coverage directory used by tools like istanbul
-coverage
-
-# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
-.grunt
-
-# node-waf configuration
-.lock-wscript
-
-build
-
-# Dependency directory
-# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
-
-lib
+build
dist
-test/test-data/go-ipfs-repo/LOCK
-test/test-data/go-ipfs-repo/LOG
-test/test-data/go-ipfs-repo/LOG.old
-
-# while testing npm5
+.docs
+.coverage
+node_modules
package-lock.json
yarn.lock
diff --git a/README.md b/README.md
index 483de7a5..cd99ca7f 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,16 @@
# @libp2p/crypto
[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
-[![IRC](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-crypto.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-crypto)
-[![CI](https://img.shields.io/github/workflow/status/libp2p/js-libp2p-interfaces/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/libp2p/js-libp2p-crypto/actions/workflows/js-test-and-release.yml)
+[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-crypto/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-crypto/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
> Crypto primitives for libp2p
## Table of contents
- [Install](#install)
+ - [Browser `
+```
+
This repo contains the JavaScript implementation of the crypto primitives needed for libp2p. This is based on this [go implementation](https://github.com/libp2p/go-libp2p-crypto).
## Lead Maintainer
@@ -305,6 +314,10 @@ This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/c
[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)
+## API Docs
+
+-
+
## License
Licensed under either of
diff --git a/package.json b/package.json
index 2188edb2..b146c405 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,7 @@
},
"files": [
"src",
- "dist/src",
+ "dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
@@ -175,6 +175,7 @@
"test:node": "aegir test -t node --cov",
"test:electron-main": "aegir test -t electron-main",
"release": "aegir release",
+ "docs": "aegir docs",
"generate": "protons ./src/keys/keys.proto"
},
"dependencies": {
diff --git a/src/keys/rsa.ts b/src/keys/rsa.ts
index 3209ded2..6836c5b1 100644
--- a/src/keys/rsa.ts
+++ b/src/keys/rsa.ts
@@ -50,9 +50,9 @@ export async function hashAndSign (key: JsonWebKey, msg: Uint8Array) { // eslint
}
export async function hashAndVerify (key: JsonWebKey, sig: Uint8Array, msg: Uint8Array) { // eslint-disable-line require-await
- // @ts-expect-error node types are missing jwk as a format
return crypto.createVerify('RSA-SHA256')
.update(msg)
+ // @ts-expect-error node types are missing jwk as a format
.verify({ format: 'jwk', key }, sig)
}