# crypto-js
JavaScript library of crypto standards.
## Node.js (Install)
Requirements:
- Node.js
- npm (Node.js package manager)
```bash
npm install crypto-js
```
### Usage
Modular include:
```javascript
var AES = require("crypto-js/aes");
var SHA256 = require("crypto-js/sha256");
...
console.log(SHA256("Message"));
```
Including all libraries, for access to extra methods:
```javascript
var CryptoJS = require("crypto-js");
console.log(CryptoJS.HmacSHA1("Message", "Key"));
```
## Client (browser)
Requirements:
- Node.js
- Bower (package manager for frontend)
```bash
bower install crypto-js
```
### Usage
Modular include:
```javascript
require.config({
packages: [
{
name: 'crypto-js',
location: 'path-to/bower_components/crypto-js',
main: 'index'
}
]
});
require(["crypto-js/aes", "crypto-js/sha256"], function (AES, SHA256) {
console.log(SHA256("Message"));
});
```
Including all libraries, for access to extra methods:
```javascript
// Above-mentioned will work or use this simple form
require.config({
paths: {
'crypto-js': 'path-to/bower_components/crypto-js/crypto-js'
}
});
require(["crypto-js"], function (CryptoJS) {
console.log(CryptoJS.HmacSHA1("Message", "Key"));
});
```
### Usage without RequireJS
```html
<script type="text/javascript" src="path-to/bower_components/crypto-js/crypto-js.js"></script>
<script type="text/javascript">
var encrypted = CryptoJS.AES(...);
var encrypted = CryptoJS.SHA256(...);
</script>
```
## API
See: https://code.google.com/p/crypto-js
### AES Encryption
#### Plain text encryption
```javascript
var CryptoJS = require("crypto-js");
// Encrypt
var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123');
// Decrypt
var bytes = CryptoJS.AES.decrypt(ciphertext.toString(), 'secret key 123');
var plaintext = bytes.toString(CryptoJS.enc.Utf8);
console.log(plaintext);
```
#### Object encryption
```javascript
var CryptoJS = require("crypto-js");
var data = [{id: 1}, {id: 2}]
// Encrypt
var ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), 'secret key 123');
// Decrypt
var bytes = CryptoJS.AES.decrypt(ciphertext.toString(), 'secret key 123');
var decryptedData = JSON.parse(bytes.toString(CryptoJS.enc.Utf8));
console.log(decryptedData);
```
### List of modules
- ```crypto-js/core```
- ```crypto-js/x64-core```
- ```crypto-js/lib-typedarrays```
---
- ```crypto-js/md5```
- ```crypto-js/sha1```
- ```crypto-js/sha256```
- ```crypto-js/sha224```
- ```crypto-js/sha512```
- ```crypto-js/sha384```
- ```crypto-js/sha3```
- ```crypto-js/ripemd160```
---
- ```crypto-js/hmac-md5```
- ```crypto-js/hmac-sha1```
- ```crypto-js/hmac-sha256```
- ```crypto-js/hmac-sha224```
- ```crypto-js/hmac-sha512```
- ```crypto-js/hmac-sha384```
- ```crypto-js/hmac-sha3```
- ```crypto-js/hmac-ripemd160```
---
- ```crypto-js/pbkdf2```
---
- ```crypto-js/aes```
- ```crypto-js/tripledes```
- ```crypto-js/rc4```
- ```crypto-js/rabbit```
- ```crypto-js/rabbit-legacy```
- ```crypto-js/evpkdf```
---
- ```crypto-js/format-openssl```
- ```crypto-js/format-hex```
---
- ```crypto-js/enc-latin1```
- ```crypto-js/enc-utf8```
- ```crypto-js/enc-hex```
- ```crypto-js/enc-utf16```
- ```crypto-js/enc-base64```
---
- ```crypto-js/mode-cfb```
- ```crypto-js/mode-ctr```
- ```crypto-js/mode-ctr-gladman```
- ```crypto-js/mode-ofb```
- ```crypto-js/mode-ecb```
---
- ```crypto-js/pad-pkcs7```
- ```crypto-js/pad-ansix923```
- ```crypto-js/pad-iso10126```
- ```crypto-js/pad-iso97971```
- ```crypto-js/pad-zeropadding```
- ```crypto-js/pad-nopadding```
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
微信小程序是一种轻量级的应用开发平台,主要针对移动端,由腾讯公司推出,旨在方便开发者快速构建功能丰富的轻应用。在本资源中,我们拥有的是“骆驼优品服饰商城”这一特定主题的小程序源码,它是一个专门用于展示和销售服饰商品的在线商城平台。该源码包括了完整的前后端代码,可以被开发者用来学习、参考或直接用于项目开发。 源码是编程的基础,它是程序的原始代码,包含了应用程序的所有逻辑和功能。在这个压缩包里,"源码"部分可能包含了小程序的wxml(结构文件)、wxss(样式文件)、js(逻辑文件)以及json(配置文件)等核心组成部分。开发者可以通过阅读和理解这些源码,了解商城小程序的页面布局、交互逻辑、数据处理以及网络请求等具体实现。 "源码导入文档教程"和"源码导入视频教程"是辅助材料,它们为开发者提供了如何将源码导入到微信开发者工具并进行调试、修改和运行的步骤。微信开发者工具是微信官方提供的一个集成开发环境,具备预览、调试、发布等功能,是开发微信小程序的必备工具。文档和视频教程的存在使得即使是没有小程序开发经验的用户也能按照指导一步步操作。 "详细图文文档教程.doc"很可能提供了关于小程序
资源推荐
资源详情
资源评论
收起资源包目录
精选微信小程序源码:服装商城小程序(含源码+源码导入视频教程&文档教程,亲测可用) (209个子文件)
详细图文文档教程.doc 975KB
源码导入文档教程.docx 182KB
crypto-js.js 187KB
cipher-core.js 29KB
tripledes.js 24KB
member.js 24KB
core.js 22KB
sha512.js 13KB
order.js 11KB
product.js 11KB
sha3.js 10KB
utility.js 9KB
md5.js 9KB
ripemd160.js 9KB
x64-core.js 9KB
aes.js 8KB
home.js 7KB
rabbit-legacy.js 7KB
rabbit.js 7KB
sha256.js 5KB
constant.js 5KB
pbkdf2.js 4KB
enc-utf16.js 4KB
sha1.js 4KB
enc-base64.js 4KB
hmac.js 4KB
evpkdf.js 4KB
rc4.js 3KB
buyTemp.js 3KB
mode-ctr-gladman.js 2KB
sha384.js 2KB
lib-typedarrays.js 2KB
mode-cfb.js 2KB
sha224.js 2KB
format-hex.js 2KB
index.js 2KB
match.js 1KB
portal.js 1KB
mode-ctr.js 1KB
mode-ofb.js 1KB
pad-ansix923.js 1KB
pad-iso10126.js 1KB
app.js 1KB
pad-zeropadding.js 1KB
pad-iso97971.js 918B
productCommentList.js 894B
mode-ecb.js 893B
orderReceiveList.js 889B
orderTicketList.js 887B
productComment.js 886B
mobileVerify.js 882B
productStore.js 882B
orderReceive.js 881B
orderConfirm.js 881B
productList.js 881B
orderDetail.js 880B
receiveList.js 880B
ticketList.js 878B
orderTrace.js 878B
orderList.js 876B
helpList.js 874B
profile.js 872B
account.js 872B
apply.js 868B
category.js 867B
help.js 866B
center.js 863B
basket.js 863B
search.js 863B
memberState.js 821B
index.js 652B
productDetail.js 624B
pad-nopadding.js 554B
hmac-sha384.js 501B
util.js 472B
hmac-sha512.js 468B
hmac-sha224.js 464B
hmac-sha3.js 462B
hmac-ripemd160.js 440B
hmac-sha256.js 431B
hmac-sha1.js 425B
hmac-md5.js 422B
format-openssl.js 416B
pad-pkcs7.js 411B
enc-latin1.js 362B
enc-utf8.js 360B
enc-hex.js 359B
logs.js 261B
config.js 218B
generalConfig.js 185B
app.json 2KB
package.json 664B
bower.json 588B
project.config.json 448B
logs.json 52B
profile.json 2B
apply.json 2B
productCommentList.json 2B
mobileVerify.json 2B
orderList.json 2B
共 209 条
- 1
- 2
- 3
资源评论
程序猿小D
- 粉丝: 4231
- 资源: 877
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- java.Java9的模块化.md
- InvalidSessionStateException解决办法.md
- ContentPreviewUnavailableException解决办法.md
- ShareQuotaExceededException解决办法.md
- java.Spring Boot.md
- java.常用框架.md
- java.Spring.md
- ContentRenderingFailureException解决办法.md
- RemoteServerTimeoutException解决办法.md
- java.Spring Cloud.md
- FilesystemIterator(解决方案).md
- DirectoryIterator(解决方案).md
- UnknownErrorException解决办法.md
- InvalidPenInputException解决办法.md
- RecursiveDirectoryIterator(解决方案).md
- PenNotConnectedException解决办法.md
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功