# Forge
[![npm package](https://nodei.co/npm/node-forge.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/node-forge/)
[![Build status](https://img.shields.io/travis/digitalbazaar/forge.svg?branch=master)](https://travis-ci.org/digitalbazaar/forge)
A native implementation of [TLS][] (and various other cryptographic tools) in
[JavaScript][].
Introduction
------------
The Forge software is a fully native implementation of the [TLS][] protocol
in JavaScript, a set of cryptography utilities, and a set of tools for
developing Web Apps that utilize many network resources.
Performance
------------
Forge is fast. Benchmarks against other popular JavaScript cryptography
libraries can be found here:
* http://dominictarr.github.io/crypto-bench/
* http://cryptojs.altervista.org/test/simulate-threading-speed_test.html
Documentation
-------------
* [Introduction](#introduction)
* [Performance](#performance)
* [Installation](#installation)
* [Testing](#testing)
* [Contributing](#contributing)
### API
* [Options](#options)
### Transports
* [TLS](#tls)
* [HTTP](#http)
* [SSH](#ssh)
* [XHR](#xhr)
* [Sockets](#socket)
### Ciphers
* [CIPHER](#cipher)
* [AES](#aes)
* [DES](#des)
* [RC2](#rc2)
### PKI
* [ED25519](#ed25519)
* [RSA](#rsa)
* [RSA-KEM](#rsakem)
* [X.509](#x509)
* [PKCS#5](#pkcs5)
* [PKCS#7](#pkcs7)
* [PKCS#8](#pkcs8)
* [PKCS#10](#pkcs10)
* [PKCS#12](#pkcs12)
* [ASN.1](#asn)
### Message Digests
* [SHA1](#sha1)
* [SHA256](#sha256)
* [SHA384](#sha384)
* [SHA512](#sha512)
* [MD5](#md5)
* [HMAC](#hmac)
### Utilities
* [Prime](#prime)
* [PRNG](#prng)
* [Tasks](#task)
* [Utilities](#util)
* [Logging](#log)
* [Debugging](#debug)
* [Flash Networking Support](#flash)
### Other
* [Security Considerations](#security-considerations)
* [Library Background](#library-background)
* [Contact](#contact)
* [Donations](#donations)
---------------------------------------
Installation
------------
**Note**: Please see the [Security Considerations](#security-considerations)
section before using packaging systems and pre-built files.
Forge uses a [CommonJS][] module structure with a build process for browser
bundles. The older [0.6.x][] branch with standalone files is available but will
not be regularly updated.
### Node.js
If you want to use forge with [Node.js][], it is available through `npm`:
https://npmjs.org/package/node-forge
Installation:
npm install node-forge
You can then use forge as a regular module:
```js
var forge = require('node-forge');
```
The npm package includes pre-built `forge.min.js`, `forge.all.min.js`, and
`prime.worker.min.js` using the [UMD][] format.
### Bundle / Bower
Each release is published in a separate repository as pre-built and minimized
basic forge bundles using the [UMD][] format.
https://github.com/digitalbazaar/forge-dist
This bundle can be used in many environments. In particular it can be installed
with [Bower][]:
bower install forge
### jsDelivr CDN
To use it via [jsDelivr](https://www.jsdelivr.com/package/npm/node-forge) include this in your html:
```html
<script src="https://cdn.jsdelivr.net/npm/node-forge@0.7.0/dist/forge.min.js"></script>
```
### unpkg CDN
To use it via [unpkg](https://unpkg.com/#/) include this in your html:
```html
<script src="https://unpkg.com/node-forge@0.7.0/dist/forge.min.js"></script>
```
### Development Requirements
The core JavaScript has the following requirements to build and test:
* Building a browser bundle:
* Node.js
* npm
* Testing
* Node.js
* npm
* Chrome, Firefox, Safari (optional)
Some special networking features can optionally use a Flash component. See the
[Flash README](./flash/README.md) for details.
### Building for a web browser
To create single file bundles for use with browsers run the following:
npm install
npm run build
This will create single non-minimized and minimized files that can be
included in the browser:
dist/forge.js
dist/forge.min.js
A bundle that adds some utilities and networking support is also available:
dist/forge.all.js
dist/forge.all.min.js
Include the file via:
```html
<script src="YOUR_SCRIPT_PATH/forge.js"></script>
```
or
```html
<script src="YOUR_SCRIPT_PATH/forge.min.js"></script>
```
The above bundles will synchronously create a global 'forge' object.
**Note**: These bundles will not include any WebWorker scripts (eg:
`dist/prime.worker.js`), so these will need to be accessible from the browser
if any WebWorkers are used.
### Building a custom browser bundle
The build process uses [webpack][] and the [config](./webpack.config.js) file
can be modified to generate a file or files that only contain the parts of
forge you need.
[Browserify][] override support is also present in `package.json`.
Testing
-------
### Prepare to run tests
npm install
### Running automated tests with Node.js
Forge natively runs in a [Node.js][] environment:
npm test
### Running automated tests with Headless Chrome
Automated testing is done via [Karma][]. By default it will run the tests with
Headless Chrome.
npm run test-karma
Is 'mocha' reporter output too verbose? Other reporters are available. Try
'dots', 'progress', or 'tap'.
npm run test-karma -- --reporters progress
By default [webpack][] is used. [Browserify][] can also be used.
BUNDLER=browserify npm run test-karma
### Running automated tests with one or more browsers
You can also specify one or more browsers to use.
npm run test-karma -- --browsers Chrome,Firefox,Safari,ChromeHeadless
The reporter option and `BUNDLER` environment variable can also be used.
### Running manual tests in a browser
Testing in a browser uses [webpack][] to combine forge and all tests and then
loading the result in a browser. A simple web server is provided that will
output the HTTP or HTTPS URLs to load. It also will start a simple Flash Policy
Server. Unit tests and older legacy tests are provided. Custom ports can be
used by running `node tests/server.js` manually.
To run the unit tests in a browser a special forge build is required:
npm run test-build
To run legacy browser based tests the main forge build is required:
npm run build
The tests are run with a custom server that prints out the URLs to use:
npm run test-server
### Running other tests
There are some other random tests and benchmarks available in the tests
directory.
### Coverage testing
To perform coverage testing of the unit tests, run the following. The results
will be put in the `coverage/` directory. Note that coverage testing can slow
down some tests considerably.
npm install
npm run coverage
Contributing
------------
Any contributions (eg: PRs) that are accepted will be brought under the same
license used by the rest of the Forge project. This license allows Forge to
be used under the terms of either the BSD License or the GNU General Public
License (GPL) Version 2.
See: [LICENSE](https://github.com/digitalbazaar/forge/blob/cbebca3780658703d925b61b2caffb1d263a6c1d/LICENSE)
If a contribution contains 3rd party source code with its own license, it
may retain it, so long as that license is compatible with the Forge license.
API
---
<a name="options" />
### Options
If at any time you wish to disable the use of native code, where available,
for particular forge features like its secure random number generator, you
may set the ```forge.options.usePureJavaScript``` flag to ```true```. It is
not recommended that you set this flag as native code is typically more
performant and may have stronger security properties. It may be useful to
set this flag to test certain features that you plan to run in environments
that are different from your testing environment.
To disable native code when including forge in the browser:
```js
// run this *after* including the forge script
forge.options.usePureJavaScript = true;
```
To disable native code when using Node.js:
```js
var forge = require('node
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Online Word Quiz - Image Guess,Sound Guess Puzzle是一款Android应用程序,支持添加无限数量的类别和每个类别内的无限数量的级别,每个级别内有无限数量的谜题,使用与Realtime Firebase数据库连接的简单管理面板,以便您可以直接在线更新您的谜题。每个谜题支持3种格式(文本+图像+声音),因此您可以使用一种格式(仅文本,仅图像,仅声音),或者您可以将所有格式一起使用,或者根据您的喜好在它们之间进行任何组合。该应用程序与AdMob Ads和In-App产品集成以删除广告。 产品特点: 动画闪屏。 在线实时Firebase数据库,能够为每个类别添加无限类别和无限级别,并为每个级别添加无限问题。 灵活的问题:支持3种格式(文本+图像+声音),您可以使用一种格式(仅文本,仅图像,仅声音),或者您可以将所有格式一起使用,或者根据您的喜好在它们之间进行任何组合。 每个答案的倒计时计时器,在最后5秒内播放声音效果,可以关闭倒计时,并且可以通过Firebase远程配置修改持续时间。 排行榜(球员姓名,排名,图像,分数),实时显示结果。能够定
资源推荐
资源详情
资源评论
收起资源包目录
Online Word Quiz Android测试游戏项目源码 Java (2040个子文件)
base.css 5KB
prettify.css 676B
.DS_Store 18KB
.DS_Store 12KB
.DS_Store 12KB
.DS_Store 12KB
.DS_Store 10KB
.DS_Store 10KB
.DS_Store 10KB
.DS_Store 8KB
.DS_Store 8KB
.DS_Store 8KB
.DS_Store 8KB
.DS_Store 8KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
API.html 85KB
get-installation-entry.ts.html 31KB
refresh-auth-token.ts.html 29KB
idb-manager.ts.html 18KB
common.ts.html 16KB
fid-changed.ts.html 16KB
generate-auth-token-request.ts.html 12KB
errors.ts.html 12KB
create-installation-request.ts.html 11KB
generate-fid.ts.html 10KB
extract-app-config.ts.html 9KB
delete-installation.ts.html 9KB
delete-installation-request.ts.html 9KB
index.html 8KB
get-token.ts.html 8KB
get-id.ts.html 7KB
on-id-change.ts.html 7KB
constants.ts.html 7KB
index.html 6KB
index.html 6KB
index.html 6KB
index.html 6KB
get-key.ts.html 6KB
sleep.ts.html 6KB
buffer-to-base64-url-safe.ts.html 5KB
index.html 1KB
index.html 1KB
tslib.es6.html 36B
tslib.html 32B
index.node.cjs.js 1MB
index.node.cjs.js 1019KB
index.node.esm2017.js 883KB
index.node.esm2017.js 879KB
firebase.js 812KB
index.memory.node.cjs.js 773KB
index.memory.node.cjs.js 758KB
index.memory.node.esm2017.js 666KB
index.memory.node.esm2017.js 656KB
index.cjs.js 646KB
index.esm.js 643KB
index.cjs.js 625KB
index.esm.js 624KB
index.esm2017.js 603KB
index.rn.esm2017.js 603KB
index.node.cjs.js 602KB
index.node.cjs.js 600KB
index.cjs.js 600KB
index.esm.js 598KB
index.cjs.js 598KB
index.esm.js 596KB
index.esm2017.js 586KB
index.esm2017.js 556KB
index.esm2017.js 555KB
index.memory.cjs.js 486KB
index.memory.esm.js 484KB
index.memory.cjs.js 469KB
index.memory.esm.js 469KB
index.memory.esm2017.js 461KB
共 2040 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21
资源评论
小云同志你好
- 粉丝: 1046
- 资源: 931
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于python的高性能爬虫程序,使用了多线程+缓存+xpath实现的,这里以彼-岸图库为例,实现,仅用于学习交流
- 中分辨率成像光谱仪(MODIS)烧毁面积产品信息MODIS-C6-BA-User-Guide-1.2.pdf
- Screenshot_20240427_172613_com.huawei.browser.jpg
- 关于学习Python的相关资源网站链接及相关介绍.docx
- (HAL库)基于STM32F103C8T6的温控PID系统[Dht11、ESP8266、无线透传、L298N……]
- VoLTE高丢包优化指导书.xlsx
- Rust资源文件.zip
- 前后端分离实践:使用 React 和 Express 搭建完整登录注册流程
- gradle-publish-to-MavenLocal.zip
- 10份网络优化创新案例.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功