Skip to content

Commit 91c8b2d

Browse files
Updating the README
1 parent dc08009 commit 91c8b2d

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
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+
* [JWE Encryption and Decryption](#jwe-encryption-and-decryption)
23+
* [Mastercard Encryption and Decryption](#mastercard-encryption-and-decryption)
2224
* [Integrating with OpenAPI Generator API Client Libraries](#integrating-with-openapi-generator-api-client-libraries)
2325

2426
## Overview <a name="overview"></a>
@@ -121,11 +123,11 @@ Supported RSA key formats:
121123

122124
+ [Introduction](#introduction)
123125
+ [JWE Encryption and Decryption](#jwe-encryption-and-decryption)
124-
+ [Field Level Encryption and Decryption](#field-level-encryption-and-decryption)
126+
+ [Mastercard Encryption and Decryption](#mastercard-encryption-and-decryption)
125127

126128
#### Introduction <a name="introduction"></a>
127129

128-
This library supports 2 different types of encryption/decryption. Field level encryption (scheme designed before JWE was introduced) and JWE encryption.
130+
This library supports two types of encryption/decryption, both of which support field level and entire payload encryption: JWE encryption and what the library refers to as Field Level Encryption (Mastercard encryption), a scheme used by many services hosted on Mastercard Developers before the library added support for JWE.
129131

130132
#### JWE Encryption and Decryption <a name="jwe-encryption-and-decryption"></a>
131133

@@ -291,18 +293,18 @@ Output:
291293
}
292294
```
293295

294-
#### Field Level Encryption and Decryption <a name="field-level-encryption-and-decryption"></a>
296+
#### Mastercard Encryption and Decryption <a name="mastercard-encryption-and-decryption"></a>
295297

296-
+ [Introduction](#fle-introduction)
297-
+ [Configuring the Field Level Encryption](#configuring-the-field-level-encryption)
298-
+ [Performing Field Level Encryption](#performing-field-level-encryption)
299-
+ [Performing Field Level Decryption](#performing-field-level-decryption)
300-
+ [Encrypting Entire Payloads](#encrypting-entire-fle-payloads)
301-
+ [Decrypting Entire Payloads](#decrypting-entire-fle-payloads)
298+
+ [Introduction](#mastercard-introduction)
299+
+ [Configuring the Mastercard Encryption](#configuring-the-mastercard-encryption)
300+
+ [Performing Mastercard Encryption](#performing-mastercard-encryption)
301+
+ [Performing Mastercard Decryption](#performing-mastercard-decryption)
302+
+ [Encrypting Entire Payloads](#encrypting-entire-mastercard-payloads)
303+
+ [Decrypting Entire Payloads](#decrypting-entire-mastercard-payloads)
302304
+ [Using HTTP Headers for Encryption Params](#using-http-headers-for-encryption-params)
303305

304-
#### Introduction <a name="fle-introduction"></a>
305-
306+
#### Introduction <a name="mastercard-introduction"></a>
307+
306308
The core methods responsible for payload encryption and decryption are `encryptPayload` and `decryptPayload` in the `FieldLevelEncryption` class.
307309

308310
* `encryptPayload` usage:
@@ -316,7 +318,7 @@ String encryptedRequestPayload = FieldLevelEncryption.encryptPayload(requestPayl
316318
String responsePayload = FieldLevelEncryption.decryptPayload(encryptedResponsePayload, config);
317319
```
318320

319-
#### Configuring the Field Level Encryption <a name="configuring-the-field-level-encryption"></a>
321+
#### Configuring the Mastercard Encryption <a name="configuring-the-mastercard-encryption"></a>
320322
Use the `FieldLevelEncryptionConfigBuilder` to create `EncryptionConfig` instances. Example:
321323
```java
322324
EncryptionConfig config = FieldLevelEncryptionConfigBuilder.aFieldLevelEncryptionConfig()
@@ -336,7 +338,7 @@ See also:
336338
* [FieldLevelEncryptionConfig.java](https://www.javadoc.io/page/com.mastercard.developer/client-encryption/latest/com/mastercard/developer/encryption/FieldLevelEncryptionConfig.html) for all config options
337339
* [Service Configurations for Client Encryption Java](https://github.com/Mastercard/client-encryption-java/wiki/Service-Configurations-for-Client-Encryption-Java)
338340

339-
#### Performing Field Level Encryption <a name="performing-field-level-encryption"></a>
341+
#### Performing Mastercard Encryption <a name="performing-mastercard-encryption"></a>
340342

341343
Call `FieldLevelEncryption.encryptPayload` with a JSON request payload and an `EncryptionConfig` instance.
342344

@@ -371,7 +373,7 @@ Output:
371373
}
372374
```
373375

374-
#### Performing Field Level Decryption <a name="performing-field-level-decryption"></a>
376+
#### Performing Mastercard Decryption <a name="performing-mastercard-decryption"></a>
375377

376378
Call `FieldLevelEncryption.decryptPayload` with a JSON response payload and an `EncryptionConfig` instance.
377379

@@ -406,7 +408,7 @@ Output:
406408
}
407409
```
408410

409-
#### Encrypting Entire Payloads <a name="encrypting-entire-fle-payloads"></a>
411+
#### Encrypting Entire Payloads <a name="encrypting-entire-mastercard-payloads"></a>
410412

411413
Entire payloads can be encrypted using the "$" operator as encryption path:
412414

@@ -437,7 +439,7 @@ Output:
437439
}
438440
```
439441

440-
#### Decrypting Entire Payloads <a name="decrypting-entire-fle-payloads"></a>
442+
#### Decrypting Entire Payloads <a name="decrypting-entire-mastercard-payloads"></a>
441443

442444
Entire payloads can be decrypted using the "$" operator as decryption path:
443445

0 commit comments

Comments
 (0)