Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shawroger authored Aug 28, 2019
1 parent 0ea037d commit 47d3653
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
# TaiNine

一个简单的加密解密字符串的php文件

太难,因为有81个字符随机替换,能不难么。

#### 原理

将post的字符串转化成html实例格式(避免中文影响),变成一个长字符串,随机替换字符序列,且与字符长度位置有关,取81同余。

###### 函数

1.toHtml 转换成html实例格式。

2.backHtml 上个函数的逆函数。

3.encrypt 加密函数

4.decrypt 解密函数

示例:

```
$tq=new TaiNine('你好');
$tq->encrypt(); //加密
echo $tq->encryptData."\r\n"; //加密结果
echo $tq->method."\r\n"; //加密方法
$tq->decrypt($tq->encryptData,$tq->method); //解密
echo $tq->decryptData."\r\n"; //还原
```

0 comments on commit 47d3653

Please sign in to comment.