Skip to content

Commit 7050e61

Browse files
committed
Merge tags: v2.1.9, v2.1.10, v2.1.11, v3.0.1, v3.0.2, v3.0.3, v3.2.0, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.8.3, v3.9.0, v3.9.1, v3.9.2, v3.9.3, v3.9.4, v3.9.7, v3.9.8, v3.9.9, v3.9.10, v3.9.11, v3.9.12, v3.9.13, v3.9.14, v3.10.0, v3.11.0, v3.11.1, v3.12.0
(so that all tags are reachable from the default branch)

35 files changed

+1462
-1149
lines changed

.eslintrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"root": true,
3+
4+
"extends": "@ljharb",
5+
6+
"rules": {
7+
"func-style": "off",
8+
"multiline-comment-style": "off",
9+
"sort-keys": "off",
10+
},
11+
12+
"ignorePatterns": [
13+
"example/bundle.js",
14+
],
15+
16+
"overrides": [
17+
{
18+
"files": "example/**",
19+
"rules": {
20+
"no-console": "off",
21+
},
22+
},
23+
],
24+
}

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: [ljharb]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: npm/crypto-browserify
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/node-aught.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: 'Tests: node.js < 10'
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
tests:
7+
uses: ljharb/actions/.github/workflows/node.yml@main
8+
with:
9+
range: '>= 0.10 < 10'
10+
type: minors
11+
command: npm run tests-only
12+
skip-ls-check: true

.github/workflows/node-pretest.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Tests: pretest/posttest'
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
tests:
7+
uses: ljharb/actions/.github/workflows/pretest.yml@main
8+
with:
9+
skip-engines: true # see https://github.com/browserify/browserify-sign/pull/49

.github/workflows/node-tens.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 'Tests: node.js >= 10'
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
tests:
7+
uses: ljharb/actions/.github/workflows/node.yml@main
8+
with:
9+
range: '>= 10'
10+
type: minors
11+
command: npm run tests-only

.github/workflows/rebase.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Automatic Rebase
2+
3+
on: [pull_request_target]
4+
5+
jobs:
6+
_:
7+
uses: ljharb/actions/.github/workflows/rebase.yml@main
8+
secrets:
9+
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Require “Allow Edits”
2+
3+
on: [pull_request_target]
4+
5+
jobs:
6+
_:
7+
name: "Require “Allow Edits”"
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: ljharb/require-allow-edits@main

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1+
# gitignore
2+
13
node_modules
4+
5+
# Only apps should have lockfiles
6+
npm-shrinkwrap.json
7+
package-lock.json
8+
yarn.lock

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.travis.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1+
sudo: false
12
language: node_js
2-
node_js:
3-
- 0.8
4-
- "0.10"
5-
3+
matrix:
4+
include:
5+
env: TEST_SUITE=browser BROWSER_NAME=ie BROWSER_VERSION="10..latest"
6+
- node_js: '4'
7+
env: TEST_SUITE=browser BROWSER_NAME=chrome BROWSER_VERSION="-2..beta"
8+
- node_js: '4'
9+
env: TEST_SUITE=browser BROWSER_NAME=firefox BROWSER_VERSION="-2..latest"
10+
- node_js: '4'
11+
env: TEST_SUITE=browser BROWSER_NAME=safari BROWSER_VERSION="7..latest"
12+
- node_js: '4'
13+
env: TEST_SUITE=browser BROWSER_NAME=android BROWSER_VERSION="5.0..latest"
14+
script: "npm run-script $TEST_SUITE"
15+
env:
16+
global:
17+
- secure: YHNUDQmx/WiW3gmDcRCfb6KLDeio7Mr5tqPY2kHPdZlBSytsQjNk75ytM4U6Cu8Uk8iEIoj/aFlxiVMpJNA8J4QSUyW/YkbVaIz0+1oywoV0Ht8aRBfZ1jvXfX6789+1Q9c4xaMkYYbJpXSh9JcirsiwmqWd4+IDd7hcESodsDQ=
18+
- secure: Nhj5yejKZxUbtHGZta+GjYWqXGaOZB7ainTkOuGcpXM+OwwjeDpYlTBrwS90Q7hqens7KXVzQM09aDbadpsDCsOo1nyaEigMtomAorZ1UC1CpEoVz1ZuikF9bEhb+/7M9pzuL1fX+Ke9Dx4mPPeb8sf/2SrAu1RqXkSwZV/duAc=

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# crypto-browserify <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2+
3+
A port of node's `crypto` module to the browser.
4+
5+
[![github actions][actions-image]][actions-url]
6+
[![coverage][codecov-image]][codecov-url]
7+
[![License][license-image]][license-url]
8+
[![Downloads][downloads-image]][downloads-url]
9+
[![Sauce Test Status](https://saucelabs.com/browser-matrix/crypto-browserify.svg)](https://saucelabs.com/u/crypto-browserify)
10+
11+
[![npm badge][npm-badge-png]][package-url]
12+
13+
14+
The goal of this module is to reimplement node's crypto module,
15+
in pure javascript so that it can run in the browser.
16+
17+
Here is the subset that is currently implemented:
18+
19+
* createHash (sha1, sha224, sha256, sha384, sha512, md5, rmd160)
20+
* createHmac (sha1, sha224, sha256, sha384, sha512, md5, rmd160)
21+
* pbkdf2
22+
* pbkdf2Sync
23+
* randomBytes
24+
* pseudoRandomBytes
25+
* createCipher (aes)
26+
* createDecipher (aes)
27+
* createDiffieHellman
28+
* createSign (rsa, ecdsa)
29+
* createVerify (rsa, ecdsa)
30+
* createECDH (secp256k1)
31+
* publicEncrypt/privateDecrypt (rsa)
32+
* privateEncrypt/publicDecrypt (rsa)
33+
34+
## todo
35+
36+
these features from node's `crypto` are still unimplemented.
37+
38+
* createCredentials
39+
40+
## contributions
41+
42+
If you are interested in writing a feature, please implement as a new module,
43+
which will be incorporated into crypto-browserify as a dependency.
44+
45+
All deps must be compatible with node's crypto
46+
(generate example inputs and outputs with node,
47+
and save base64 strings inside JSON, so that tests can run in the browser.
48+
see [sha.js](https://github.com/dominictarr/sha.js)
49+
50+
Crypto is _extra serious_ so please do not hesitate to review the code,
51+
and post comments if you do.
52+
53+
## License
54+
55+
MIT
56+
57+
[package-url]: https://npmjs.org/package/crypto-browserify
58+
[npm-version-svg]: https://versionbadg.es/browserify/crypto-browserify.svg
59+
[deps-svg]: https://david-dm.org/browserify/crypto-browserify.svg
60+
[deps-url]: https://david-dm.org/browserify/crypto-browserify
61+
[dev-deps-svg]: https://david-dm.org/browserify/crypto-browserify/dev-status.svg
62+
[dev-deps-url]: https://david-dm.org/browserify/crypto-browserify#info=devDependencies
63+
[npm-badge-png]: https://nodei.co/npm/crypto-browserify.png?downloads=true&stars=true
64+
[license-image]: https://img.shields.io/npm/l/crypto-browserify.svg
65+
[license-url]: LICENSE
66+
[downloads-image]: https://img.shields.io/npm/dm/crypto-browserify.svg
67+
[downloads-url]: https://npm-stat.com/charts.html?package=crypto-browserify
68+
[codecov-image]: https://codecov.io/gh/browserify/crypto-browserify/branch/main/graphs/badge.svg
69+
[codecov-url]: https://app.codecov.io/gh/browserify/crypto-browserify/
70+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/browserify/crypto-browserify
71+
[actions-url]: https://github.com/browserify/crypto-browserify/actions

create-hash.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

create-hmac.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)