Skip to content

Commit

Permalink
Merge tags: v2.1.9, v2.1.10, v2.1.11, v3.0.1, v3.0.2, `v3.0…
Browse files Browse the repository at this point in the history
….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)
  • Loading branch information
Show file tree
Hide file tree
Showing 35 changed files with 1,462 additions and 1,149 deletions.
24 changes: 24 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"root": true,

"extends": "@ljharb",

"rules": {
"func-style": "off",
"multiline-comment-style": "off",
"sort-keys": "off",
},

"ignorePatterns": [
"example/bundle.js",
],

"overrides": [
{
"files": "example/**",
"rules": {
"no-console": "off",
},
},
],
}
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/crypto-browserify
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
12 changes: 12 additions & 0 deletions .github/workflows/node-aught.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Tests: node.js < 10'

on: [pull_request, push]

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '>= 0.10 < 10'
type: minors
command: npm run tests-only
skip-ls-check: true
9 changes: 9 additions & 0 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 'Tests: pretest/posttest'

on: [pull_request, push]

jobs:
tests:
uses: ljharb/actions/.github/workflows/pretest.yml@main
with:
skip-engines: true # see https://github.com/browserify/browserify-sign/pull/49
11 changes: 11 additions & 0 deletions .github/workflows/node-tens.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'Tests: node.js >= 10'

on: [pull_request, push]

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '>= 10'
type: minors
command: npm run tests-only
9 changes: 9 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Automatic Rebase

on: [pull_request_target]

jobs:
_:
uses: ljharb/actions/.github/workflows/rebase.yml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/require-allow-edits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Require “Allow Edits”

on: [pull_request_target]

jobs:
_:
name: "Require “Allow Edits”"

runs-on: ubuntu-latest

steps:
- uses: ljharb/require-allow-edits@main
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# gitignore

node_modules

# Only apps should have lockfiles
npm-shrinkwrap.json
package-lock.json
yarn.lock
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
21 changes: 17 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
sudo: false
language: node_js
node_js:
- 0.8
- "0.10"

matrix:
include:
env: TEST_SUITE=browser BROWSER_NAME=ie BROWSER_VERSION="10..latest"
- node_js: '4'
env: TEST_SUITE=browser BROWSER_NAME=chrome BROWSER_VERSION="-2..beta"
- node_js: '4'
env: TEST_SUITE=browser BROWSER_NAME=firefox BROWSER_VERSION="-2..latest"
- node_js: '4'
env: TEST_SUITE=browser BROWSER_NAME=safari BROWSER_VERSION="7..latest"
- node_js: '4'
env: TEST_SUITE=browser BROWSER_NAME=android BROWSER_VERSION="5.0..latest"
script: "npm run-script $TEST_SUITE"
env:
global:
- secure: YHNUDQmx/WiW3gmDcRCfb6KLDeio7Mr5tqPY2kHPdZlBSytsQjNk75ytM4U6Cu8Uk8iEIoj/aFlxiVMpJNA8J4QSUyW/YkbVaIz0+1oywoV0Ht8aRBfZ1jvXfX6789+1Q9c4xaMkYYbJpXSh9JcirsiwmqWd4+IDd7hcESodsDQ=
- secure: Nhj5yejKZxUbtHGZta+GjYWqXGaOZB7ainTkOuGcpXM+OwwjeDpYlTBrwS90Q7hqens7KXVzQM09aDbadpsDCsOo1nyaEigMtomAorZ1UC1CpEoVz1ZuikF9bEhb+/7M9pzuL1fX+Ke9Dx4mPPeb8sf/2SrAu1RqXkSwZV/duAc=
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# crypto-browserify <sup>[![Version Badge][npm-version-svg]][package-url]</sup>

A port of node's `crypto` module to the browser.

[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![Sauce Test Status](https://saucelabs.com/browser-matrix/crypto-browserify.svg)](https://saucelabs.com/u/crypto-browserify)

[![npm badge][npm-badge-png]][package-url]


The goal of this module is to reimplement node's crypto module,
in pure javascript so that it can run in the browser.

Here is the subset that is currently implemented:

* createHash (sha1, sha224, sha256, sha384, sha512, md5, rmd160)
* createHmac (sha1, sha224, sha256, sha384, sha512, md5, rmd160)
* pbkdf2
* pbkdf2Sync
* randomBytes
* pseudoRandomBytes
* createCipher (aes)
* createDecipher (aes)
* createDiffieHellman
* createSign (rsa, ecdsa)
* createVerify (rsa, ecdsa)
* createECDH (secp256k1)
* publicEncrypt/privateDecrypt (rsa)
* privateEncrypt/publicDecrypt (rsa)

## todo

these features from node's `crypto` are still unimplemented.

* createCredentials

## contributions

If you are interested in writing a feature, please implement as a new module,
which will be incorporated into crypto-browserify as a dependency.

All deps must be compatible with node's crypto
(generate example inputs and outputs with node,
and save base64 strings inside JSON, so that tests can run in the browser.
see [sha.js](https://github.com/dominictarr/sha.js)

Crypto is _extra serious_ so please do not hesitate to review the code,
and post comments if you do.

## License

MIT

[package-url]: https://npmjs.org/package/crypto-browserify
[npm-version-svg]: https://versionbadg.es/browserify/crypto-browserify.svg
[deps-svg]: https://david-dm.org/browserify/crypto-browserify.svg
[deps-url]: https://david-dm.org/browserify/crypto-browserify
[dev-deps-svg]: https://david-dm.org/browserify/crypto-browserify/dev-status.svg
[dev-deps-url]: https://david-dm.org/browserify/crypto-browserify#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/crypto-browserify.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/crypto-browserify.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/crypto-browserify.svg
[downloads-url]: https://npm-stat.com/charts.html?package=crypto-browserify
[codecov-image]: https://codecov.io/gh/browserify/crypto-browserify/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/browserify/crypto-browserify/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/browserify/crypto-browserify
[actions-url]: https://github.com/browserify/crypto-browserify/actions
30 changes: 0 additions & 30 deletions create-hash.js

This file was deleted.

41 changes: 0 additions & 41 deletions create-hmac.js

This file was deleted.

Loading

0 comments on commit 7050e61

Please sign in to comment.