Skip to content

Commit ecfd553

Browse files
authored
Fixed ToC and heading levels
1 parent 7a34045 commit ecfd553

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* [Loading the Encryption Certificate](#loading-the-encryption-certificate)
2020
* [Loading the Decryption Key](#loading-the-decryption-key)
2121
* [Performing Payload Encryption and Decryption](#performing-payload-encryption-and-decryption)
22+
* [Introduction](#introduction)
2223
* [JWE Encryption and Decryption](#jwe-encryption-and-decryption)
2324
* [Mastercard Encryption and Decryption](#mastercard-encryption-and-decryption)
2425
* [Integrating with OpenAPI Generator API Client Libraries](#integrating-with-openapi-generator-api-client-libraries)
@@ -138,7 +139,7 @@ This library supports two types of encryption/decryption, both of which support
138139
+ [Encrypting Entire Payloads](#encrypting-entire-payloads-jwe)
139140
+ [Decrypting Entire Payloads](#decrypting-entire-payloads-jwe)
140141

141-
#### Introduction <a name="jwe-introduction"></a>
142+
##### Introduction <a name="jwe-introduction"></a>
142143

143144
This library uses [JWE compact serialization](https://datatracker.ietf.org/doc/html/rfc7516#section-7.1) for the encryption of sensitive data.
144145
The core methods responsible for payload encryption and decryption are `encryptPayload` and `decryptPayload` in the `JweEncryption` class.
@@ -154,7 +155,7 @@ String encryptedRequestPayload = JweEncryption.encryptPayload(requestPayload, co
154155
String responsePayload = JweEncryption.decryptPayload(encryptedResponsePayload, config);
155156
```
156157

157-
#### Configuring the JWE Encryption <a name="configuring-the-jwe-encryption"></a>
158+
##### Configuring the JWE Encryption <a name="configuring-the-jwe-encryption"></a>
158159
Use the `JweConfigBuilder` to create `JweConfig` instances. Example:
159160
```java
160161
JweConfig config = JweConfigBuilder.aJweEncryptionConfig()
@@ -169,7 +170,7 @@ JweConfig config = JweConfigBuilder.aJweEncryptionConfig()
169170
See also:
170171
* [Service Configurations for Client Encryption Java](https://github.com/Mastercard/client-encryption-java/wiki/Service-Configurations-for-Client-Encryption-Java)
171172

172-
#### Performing JWE Encryption <a name="performing-jwe-encryption"></a>
173+
##### Performing JWE Encryption <a name="performing-jwe-encryption"></a>
173174

174175
Call `JweEncryption.encryptPayload` with a JSON request payload and a `JweConfig` instance.
175176

@@ -202,7 +203,7 @@ Output:
202203
}
203204
```
204205

205-
#### Performing JWE Decryption <a name="performing-jwe-decryption"></a>
206+
##### Performing JWE Decryption <a name="performing-jwe-decryption"></a>
206207

207208
Call `JweEncryption.decryptPayload` with a JSON response payload and a `JweConfig` instance.
208209

@@ -235,7 +236,7 @@ Output:
235236
}
236237
```
237238

238-
#### Encrypting Entire Payloads <a name="encrypting-entire-payloads-jwe"></a>
239+
##### Encrypting Entire Payloads <a name="encrypting-entire-payloads-jwe"></a>
239240

240241
Entire payloads can be encrypted using the "$" operator as encryption path:
241242

@@ -264,7 +265,7 @@ Output:
264265
}
265266
```
266267

267-
#### Decrypting Entire Payloads <a name="decrypting-entire-payloads-jwe"></a>
268+
##### Decrypting Entire Payloads <a name="decrypting-entire-payloads-jwe"></a>
268269

269270
Entire payloads can be decrypted using the "$" operator as decryption path:
270271

@@ -303,7 +304,7 @@ Output:
303304
+ [Decrypting Entire Payloads](#decrypting-entire-mastercard-payloads)
304305
+ [Using HTTP Headers for Encryption Params](#using-http-headers-for-encryption-params)
305306

306-
#### Introduction <a name="mastercard-introduction"></a>
307+
##### Introduction <a name="mastercard-introduction"></a>
307308

308309
The core methods responsible for payload encryption and decryption are `encryptPayload` and `decryptPayload` in the `FieldLevelEncryption` class.
309310

@@ -318,7 +319,7 @@ String encryptedRequestPayload = FieldLevelEncryption.encryptPayload(requestPayl
318319
String responsePayload = FieldLevelEncryption.decryptPayload(encryptedResponsePayload, config);
319320
```
320321

321-
#### Configuring the Mastercard Encryption <a name="configuring-the-mastercard-encryption"></a>
322+
##### Configuring the Mastercard Encryption <a name="configuring-the-mastercard-encryption"></a>
322323
Use the `FieldLevelEncryptionConfigBuilder` to create `FieldLevelEncryptionConfig` instances. Example:
323324
```java
324325
FieldLevelEncryptionConfig config = FieldLevelEncryptionConfigBuilder.aFieldLevelEncryptionConfig()
@@ -338,7 +339,7 @@ See also:
338339
* [FieldLevelEncryptionConfig.java](https://www.javadoc.io/page/com.mastercard.developer/client-encryption/latest/com/mastercard/developer/encryption/FieldLevelEncryptionConfig.html) for all config options
339340
* [Service Configurations for Client Encryption Java](https://github.com/Mastercard/client-encryption-java/wiki/Service-Configurations-for-Client-Encryption-Java)
340341

341-
#### Performing Mastercard Encryption <a name="performing-mastercard-encryption"></a>
342+
##### Performing Mastercard Encryption <a name="performing-mastercard-encryption"></a>
342343

343344
Call `FieldLevelEncryption.encryptPayload` with a JSON request payload and a `FieldLevelEncryptionConfig` instance.
344345

@@ -373,7 +374,7 @@ Output:
373374
}
374375
```
375376

376-
#### Performing Mastercard Decryption <a name="performing-mastercard-decryption"></a>
377+
##### Performing Mastercard Decryption <a name="performing-mastercard-decryption"></a>
377378

378379
Call `FieldLevelEncryption.decryptPayload` with a JSON response payload and a `FieldLevelEncryptionConfig` instance.
379380

@@ -408,7 +409,7 @@ Output:
408409
}
409410
```
410411

411-
#### Encrypting Entire Payloads <a name="encrypting-entire-mastercard-payloads"></a>
412+
##### Encrypting Entire Payloads <a name="encrypting-entire-mastercard-payloads"></a>
412413

413414
Entire payloads can be encrypted using the "$" operator as encryption path:
414415

@@ -439,7 +440,7 @@ Output:
439440
}
440441
```
441442

442-
#### Decrypting Entire Payloads <a name="decrypting-entire-mastercard-payloads"></a>
443+
##### Decrypting Entire Payloads <a name="decrypting-entire-mastercard-payloads"></a>
443444

444445
Entire payloads can be decrypted using the "$" operator as decryption path:
445446

@@ -470,13 +471,13 @@ Output:
470471
}
471472
```
472473

473-
#### Using HTTP Headers for Encryption Params <a name="using-http-headers-for-encryption-params"></a>
474+
##### Using HTTP Headers for Encryption Params <a name="using-http-headers-for-encryption-params"></a>
474475

475476
In the sections above, encryption parameters (initialization vector, encrypted symmetric key, etc.) are part of the HTTP payloads.
476477

477478
Here is how to configure the library for using HTTP headers instead.
478479

479-
##### Configuration for Using HTTP Headers <a name="configuration-for-using-http-headers"></a>
480+
###### Configuration for Using HTTP Headers <a name="configuration-for-using-http-headers"></a>
480481

481482
Call `with{Param}HeaderName` instead of `with{Param}FieldName` when building a `FieldLevelEncryptionConfig` instance. Example:
482483
```java
@@ -498,7 +499,7 @@ See also:
498499
* [FieldLevelEncryptionConfig.java](https://www.javadoc.io/page/com.mastercard.developer/client-encryption/latest/com/mastercard/developer/encryption/FieldLevelEncryptionConfig.html) for all config options
499500
* [Service Configurations for Client Encryption Java](https://github.com/Mastercard/client-encryption-java/wiki/Service-Configurations-for-Client-Encryption-Java)
500501

501-
##### Encrypting Using HTTP Headers
502+
###### Encrypting Using HTTP Headers
502503

503504
Encryption can be performed using the following steps:
504505

@@ -539,7 +540,7 @@ Output:
539540
}
540541
```
541542

542-
##### Decrypting Using HTTP Headers
543+
###### Decrypting Using HTTP Headers
543544

544545
Decryption can be performed using the following steps:
545546

0 commit comments

Comments
 (0)