@@ -10,16 +10,16 @@ LibCryptoHash 提供了solidity内置函数keccak256、sha3、ripemd160等计算
10
10
11
11
contract test {
12
12
function t_keccak(string memory s1) public returns (bytes32 result) {
13
- return LibCryptoHash.kw_keccak256 (s1);
13
+ return LibCryptoHash.getKeccak256 (s1);
14
14
}
15
15
function t_sha3(string memory s1) public view returns (bytes32 result) {
16
- return LibCryptoHash.kw_sha3 (s1);
16
+ return LibCryptoHash.getSha3 (s1);
17
17
}
18
18
function t_sha256(string memory s1) public returns (bytes32 result) {
19
- return LibCryptoHash.kw_sha256 (s1);
19
+ return LibCryptoHash.getSha256 (s1);
20
20
}
21
21
function setripemd160(string memory s1) public view returns (bytes20 result) {
22
- return LibCryptoHash.kw_ripemd160 (s1);
22
+ return LibCryptoHash.getRipemd160 (s1);
23
23
}
24
24
}
25
25
```
@@ -28,14 +28,14 @@ LibCryptoHash 提供了solidity内置函数keccak256、sha3、ripemd160等计算
28
28
29
29
编号 | API | API描述
30
30
---|---|---
31
- 1 | * kw_keccak256 (string memory s1) public returns(bytes32 result)* | keccak256算法
32
- 2 | * kw_sha3 (string memory s1) public returns(bytes32 result)* | sha3算法等同于keccak256。
33
- 3 | * kw_sha256 (string memory s1) public returns(bytes32 result)* | sha256算法。
34
- 4 | * kw_ripemd160 (string memory s1) public returns(bytes20 result)* | ripemd160算法。
31
+ 1 | * getKeccak256 (string memory s1) public returns(bytes32 result)* | keccak256算法
32
+ 2 | * getSha3 (string memory s1) public returns(bytes32 result)* | sha3算法等同于keccak256。
33
+ 3 | * getSha256 (string memory s1) public returns(bytes32 result)* | sha256算法。
34
+ 4 | * getRipemd160 (string memory s1) public returns(bytes20 result)* | ripemd160算法。
35
35
36
36
## API详情
37
37
38
- ### *** 1. kw_keccak256 函数***
38
+ ### *** 1. getKeccak256 函数***
39
39
40
40
keccak256算法
41
41
@@ -48,7 +48,7 @@ keccak256算法
48
48
49
49
## API详情
50
50
51
- ### *** 1. kw_sha3 函数***
51
+ ### *** 1. getSha3 函数***
52
52
53
53
sha3算法等同于keccak256
54
54
@@ -60,7 +60,7 @@ sha3算法等同于keccak256
60
60
- result: byte32
61
61
## API详情
62
62
63
- ### *** 1. kw_sha256 函数***
63
+ ### *** 1. getSha256 函数***
64
64
65
65
sha256算法
66
66
@@ -72,7 +72,7 @@ sha256算法
72
72
- result: byte32
73
73
## API详情
74
74
75
- ### *** 1. kw_ripemd160 函数***
75
+ ### *** 1. getRipemd160 函数***
76
76
77
77
ripemd160算法
78
78
0 commit comments