From 366068fbdf9c02aeb7b891380cdacf9f536faaa2 Mon Sep 17 00:00:00 2001 From: Sola Date: Sun, 6 Dec 2015 13:13:56 +0800 Subject: [PATCH] update to j8 --- docs/Authorize.html | 75 --------- docs/绑定微信请求.html | 151 ------------------ pom.xml | 18 ++- .../sola/netsupport/wechat/TestEncrypt.java | 27 ++++ 4 files changed, 39 insertions(+), 232 deletions(-) delete mode 100644 docs/Authorize.html delete mode 100644 docs/绑定微信请求.html create mode 100644 src/test/java/love/sola/netsupport/wechat/TestEncrypt.java diff --git a/docs/Authorize.html b/docs/Authorize.html deleted file mode 100644 index b41ce77..0000000 --- a/docs/Authorize.html +++ /dev/null @@ -1,75 +0,0 @@ -Authorize
-
-
- -
- -

Authorize

- -
-
- -
- -

Method

- -
- -

POST

- -

Parameters

- -
- -
  • wechat Wechat ID
  • -
- -

Response

- -
- -

Format

- -

JSON

- -
- -

Response Code

- -
  • Success
    -
      -
    • 0 OK
  • -
  • Error
    -
      -
    • -1 PARAMETER_REQUIRED
    • -
    • -9 AUTHORIZE_FAILED
    • -
    • -21 REQUEST_EXPIRED
  • -
- -
- -

Signature

- -

Created by Sola on 12/3/2015

\ No newline at end of file diff --git a/docs/绑定微信请求.html b/docs/绑定微信请求.html deleted file mode 100644 index fd8a1ff..0000000 --- a/docs/绑定微信请求.html +++ /dev/null @@ -1,151 +0,0 @@ -绑定微信请求 V1.3
-
-
- -
- -

绑定微信请求 V1.3

- -
-

Edition : (1.3)2015/12/04

-
- -
- -

绑定

- -
- -
- -

URL

- -

http://sola.love

- -
- -

Method

- -

POST

- -
- -

Params

- -
  • wechatid string 用户微信ID
  • -
  • name string 姓名
  • -
  • sid string 学号
  • -
  • isp integer ISP的代码
  • -
  • username string 宽带帐号
  • -
  • block integer 片区代码
  • -
  • room integer 宿舍房号
  • -
  • phone string 手机号码
  • -
- -
- -

More

- -
- -

ISP代码

- -
  • 电信 1
  • -
  • 联通 2
  • -
  • 移动 3
  • -
  • 其他 4
  • -
- -
- -

片区代码

- -
  • 岐头生活区
    -
      -
    • 18栋 10
    • -
    • 19栋 11
    • -
    • 16栋 12
    • -
    • 17栋 13
  • -
  • 北门生活区
    -
      -
    • 7栋 20
    • -
    • 8栋 21
    • -
    • 9栋 22
    • -
    • 10栋 23
    • -
    • 11栋 24
  • -
  • 东门生活区
    -
      -
    • 12栋 30
    • -
    • 13栋 31
    • -
    • 14栋 32
    • -
    • 15栋 33
  • -
  • 香晖苑
    -
      -
    • A 40
    • -
    • B 41
    • -
    • C 42
    • -
    • D 43
  • -
  • 凤翔生活区
    -
      -
    • 1栋 50
    • -
    • 2栋 51
    • -
    • 3栋 52
    • -
    • 4栋 53
    • -
    • 5栋 54
    • -
    • 6栋 55
  • -
  • 东门区
    -
      -
    • 20栋 60
    • -
    • 21栋 61
  • -
- -
- -

绑定结果页

- -
- -
- -

Method

- -

GET

- -
- -

Params

- -
  • type integer 绑定结果类型
  • -
  • msg string 绑定结果说明
  • -
- -
- -

More

- -
- -

结果类型

- -
  • 失败 0
  • -
  • 成功 1
  • -
  • 警告 -1(不推荐使用)
  • -
- -
- -

Author

- -

LiuYue(hangxingliu)

- -
- -

Date

- -

2015/12/04

\ No newline at end of file diff --git a/pom.xml b/pom.xml index 02cedd1..77db866 100644 --- a/pom.xml +++ b/pom.xml @@ -11,9 +11,9 @@ UTF-8 - 1.7 - 1.7 - 1.7 + 1.8 + 1.8 + 1.8 @@ -23,8 +23,8 @@ maven-compiler-plugin 3.3 - 1.7 - 1.7 + 1.8 + 1.8 @@ -116,6 +116,12 @@ org.hibernate.javax.persistence hibernate-jpa-2.1-api 1.0.0.Final - + + + de.svenkubiak + jBCrypt + 0.4 + + \ No newline at end of file diff --git a/src/test/java/love/sola/netsupport/wechat/TestEncrypt.java b/src/test/java/love/sola/netsupport/wechat/TestEncrypt.java new file mode 100644 index 0000000..e5779d4 --- /dev/null +++ b/src/test/java/love/sola/netsupport/wechat/TestEncrypt.java @@ -0,0 +1,27 @@ +package love.sola.netsupport.wechat; + +import org.junit.Test; +import org.mindrot.jbcrypt.BCrypt; + +/** + * *********************************************** + * Created by Sola on 2015/12/6. + * Don't modify this source without my agreement + * *********************************************** + */ +public class TestEncrypt { + + @Test + public void test() { + String hash = BCrypt.hashpw("mypasswordhere", BCrypt.gensalt()); + System.out.println("hash = " + hash); + System.out.println("BCrypt.checkpw(\"mypasswordhere\",hash) = " + BCrypt.checkpw("mypasswordhere", hash)); + } + + @Test + public void testChk() { + String hash = "$2a$10$RCXxfEygwHQeF4BKjx5Uwu/C72HqoCN.jKpNSNdwizcy7m301C9Am"; + System.out.println("BCrypt.checkpw(\"mypasswordhere\",hash) = " + BCrypt.checkpw("mypasswordhere", hash)); + } + +}