Skip to content

Commit a2b69b1

Browse files
authored
chore: sort imports in the Markdown examples (#3822)
1 parent b17feb5 commit a2b69b1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/en/latest/examples/plugins-hmac-auth-generate-signature.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ title: HMAC Generate Signature Examples
2424
## Python 3
2525

2626
```python
27+
import base64
2728
import hashlib
2829
import hmac
29-
import base64
3030

3131
secret = bytes('the shared secret key here', 'utf-8')
3232
message = bytes('this is signature string', 'utf-8')
@@ -46,8 +46,8 @@ base64.b64encode(hash.digest())
4646
```java
4747
import javax.crypto.Mac;
4848
import javax.crypto.spec.SecretKeySpec;
49-
import java.security.NoSuchAlgorithmException;
5049
import java.security.InvalidKeyException;
50+
import java.security.NoSuchAlgorithmException;
5151
import javax.xml.bind.DatatypeConverter;
5252

5353
class Main {
@@ -103,8 +103,8 @@ func main() {
103103
## Ruby
104104

105105
```ruby
106-
require 'openssl'
107106
require 'base64'
107+
require 'openssl'
108108

109109
secret = 'the shared secret key here'
110110
message = 'this is signature string'

docs/en/latest/plugins/hmac-auth.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ Note: The last request header also needs + `\n`.
168168
Use Python to generate the signature `SIGNATURE`:
169169

170170
```python
171+
import base64
171172
import hashlib
172173
import hmac
173-
import base64
174174

175175
secret = bytes('my-secret-key', 'utf-8')
176176
message = bytes("""GET

docs/zh/latest/plugins/hmac-auth.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ x-custom-a:test
162162
使用 Python 来生成签名 `SIGNATURE`
163163

164164
```python
165+
import base64
165166
import hashlib
166167
import hmac
167-
import base64
168168

169169
secret = bytes('my-secret-key', 'utf-8')
170170
message = bytes("""GET

0 commit comments

Comments
 (0)