Skip to content

Commit e331ca7

Browse files
author
cc11001100
committed
docs: commit all pending changes
1 parent 01bee89 commit e331ca7

40 files changed

Lines changed: 23548 additions & 68 deletions

.github/workflows/deploy.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # 或者 master,取决于你的默认分支名称
7+
workflow_dispatch: # 允许手动触发
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# 只允许一个并发部署
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build:
21+
name: Build
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v3
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: 16
31+
cache: 'npm'
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
- name: Build project
37+
run: npm run build
38+
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v3
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v2
44+
with:
45+
path: './build'
46+
47+
deploy:
48+
name: Deploy
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-latest
53+
needs: build
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v2

.gitignore

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1-
.idea
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# IDE
26+
.idea/
27+
.vscode/
28+
*.swp
29+
*.swo
30+
31+
# 系统文件
32+
Thumbs.db

README.md

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,59 @@
1-
# RSA libs
1+
# RSA 加密/解密工具
22

3-
# 一、这是什么
3+
一个基于React和TypeScript的RSA加密/解密工具,支持PEM、Base64和Hex格式的密钥。
44

5-
RSA加密需要依赖的一些文件,在进行JavaScript逆向的时候经常会遇到一些RSA类型的加密,如果我们有一个RSA加密库就不必辛苦从目标网站的页面中扣那么多代码了,只需要扣出来加密需要的参数然后引入这个库加密就可以了。
5+
## 功能特点
66

7-
# 二、在线测试
7+
- **多种密钥格式支持**:支持PEM、Base64和Hex三种编码格式
8+
- **自动格式识别**:粘贴密钥时自动识别其编码格式
9+
- **密钥对验证**:验证公钥和私钥是否匹配
10+
- **数据本地存储**:使用localStorage存储表单数据,页面刷新后不丢失
11+
- **美观的UI界面**:使用Tailwind CSS构建的现代化界面
812

9-
访问下面的连接可以[在线测试](https://htmlpreview.github.io/?https://github.com/JSREI/rsa-libs/blob/main/examples/html/dev/index.html)
13+
## 在线演示
1014

11-
```
12-
https://htmlpreview.github.io/?https://github.com/JSREI/rsa-libs/blob/main/examples/html/dev/index.html
13-
```
15+
访问 [https://jsrei.github.io/rsa-libs](https://jsrei.github.io/rsa-libs) 查看在线演示。
1416

15-
界面大概如下:
17+
## 本地开发
1618

17-
![image-20230820234015071](README.assets/image-20230820234015071.png)
19+
### 环境要求
1820

19-
加密结果:
21+
- Node.js 16+
22+
- npm 8+
2023

21-
![image-20230820234003408](README.assets/image-20230820234003408.png)
24+
### 安装依赖
2225

23-
# 三、本地使用
26+
```bash
27+
npm install
28+
```
2429

25-
`libs/dev`下的三个文件是未压缩的原始文件依赖,RSA加密需要依赖这三个文件,而`libs/dist/rsa.min.js`文件是把上面的三个文件打包压缩的单个文件,根据自己的需要拷贝到自己项目的依赖中,API的使用可以参考此文件:
30+
### 启动开发服务器
2631

27-
```text
28-
https://github.com/JSREI/rsa-libs/blob/main/examples/html/dev/index.html
32+
```bash
33+
npm start
2934
```
3035

36+
### 构建生产版本
37+
38+
```bash
39+
npm run build
40+
```
41+
42+
## 部署
43+
44+
该项目使用GitHub Actions自动部署到GitHub Pages。每当主分支有更新时,会自动触发构建和部署流程。
45+
46+
## 技术栈
47+
48+
- React 18
49+
- TypeScript 4
50+
- Tailwind CSS 3
51+
- GitHub Actions (CI/CD)
3152

53+
## 贡献
3254

55+
欢迎提交Pull Request或创建Issue。
3356

57+
## 许可证
3458

59+
MIT

0 commit comments

Comments
 (0)