Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 93cfd51

Browse files
committed
Update README.md
1 parent a7f2739 commit 93cfd51

File tree

1 file changed

+43
-2
lines changed

1 file changed

+43
-2
lines changed

README.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,51 @@
11
# GmSSL-PHP
22

3+
## Introduction
34
The GmSSL extension is the binding to the GmSSL C library. GmSSL provides functions of Chinese SM2, SM3, SM4, SM9, ZUC crypto algorithms.
45

6+
## Installation
57

6-
GmSSL Functions
8+
To compile and install the GmSSL PHP extension, you need to install the GmSSL library (version >= 3.1.0). See the GmSSL INSTALL.md for more details.
9+
10+
```bash
11+
$ cd GmSSL-PHP-master
12+
$ phpize
13+
$ ./configure
14+
$ make
15+
$ sudo make install
16+
```
17+
18+
You can use `phpinfo()` to see if the GmSSL extension is correctly installed.
19+
20+
```php
21+
<?php
22+
phpinfo();
23+
?>
24+
```
25+
26+
## Predefined Constants
27+
28+
* `GMSSL_PHP_VERSION (string)`
29+
* `GMSSL_LIBRARAY_VERSION (string)`
30+
* `GMSSL_SM3_DIGEST_SIZE (int)`
31+
* `GMSSL_SM3_HMAC_SIZE (int)`
32+
* `GMSSL_SM4_KEY_SIZE (int)`
33+
* `GMSSL_SM4_BLOCK_SIZE (int)`
34+
* `GMSSL_SM4_GCM_MIN_IV_SIZE (int)`
35+
* `GMSSL_SM4_GCM_MAX_IV_SIZE (int)`
36+
* `GMSSL_SM4_GCM_DEFAULT_IV_SIZE (int)`
37+
* `GMSSL_SM4_GCM_MAX_TAG_SIZE (int)`
38+
* `GMSSL_SM2_DEFAULT_ID (string)`
39+
* `GMSSL_SM2_MAX_SIGNATURE_SIZE (int)`
40+
* `GMSSL_SM2_MAX_PLAINTEXT_SIZE (int)`
41+
* `GMSSL_SM2_MAX_CIPHERTEXT_SIZE (int)`
42+
* `GMSSL_SM9_SIGNATURE_SIZE (int)`
43+
* `GMSSL_SM9_MAX_PLAINTEXT_SIZE (int)`
44+
* `GMSSL_SM9_MAX_CIPHERTEXT_SIZE (int)`
45+
* `GMSSL_ZUC_KEY_SIZE (int)`
46+
* `GMSSL_ZUC_IV_SIZE (int)`
47+
48+
## GmSSL Functions
749

850
* `gmssl_version_num` - Get version number of the GmSSL C library
951
* `gmssl_version_str` - Get version string of the GmSSL C library
@@ -48,4 +90,3 @@ GmSSL Functions
4890
* `gmssl_sm9_decrypt` - Decrypt SM9 ciphertext with user's SM9 private key
4991

5092

51-

0 commit comments

Comments
 (0)