Skip to content

Commit 1a86574

Browse files
Minor clean-up on the JWE README content
1 parent 23876d9 commit 1a86574

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* [Selecting a JSON Engine](#selecting-a-json-engine)
1919
* [Loading the Encryption Certificate](#loading-the-encryption-certificate)
2020
* [Loading the Decryption Key](#loading-the-decryption-key)
21-
* [Performing Encryption and Decryption](#performing-encryption-and-decryption)
21+
* [Performing Payload Encryption and Decryption](#performing-payload-encryption-and-decryption)
2222
* [Integrating with OpenAPI Generator API Client Libraries](#integrating-with-openapi-generator-api-client-libraries)
2323

2424
## Overview <a name="overview"></a>
@@ -28,6 +28,7 @@ Library for Mastercard API compliant payload encryption/decryption.
2828
Java 8+
2929

3030
### References <a name="references"></a>
31+
* [JWE Specification](https://datatracker.ietf.org/doc/html/rfc7516)<br/>
3132
<img src="https://user-images.githubusercontent.com/3964455/55345820-c520a280-54a8-11e9-8235-407199fa1d97.png" alt="Encryption of sensitive data" width="75%" height="75%"/>
3233

3334
## Usage <a name="usage"></a>
@@ -116,27 +117,28 @@ Supported RSA key formats:
116117
* PKCS#8 PEM (starts with "-----BEGIN PRIVATE KEY-----")
117118
* Binary DER-encoded PKCS#8
118119

119-
### Performing Encryption and Decryption <a name="performing-encryption-and-decryption"></a>
120+
### Performing Payload Encryption and Decryption <a name="performing-payload-encryption-and-decryption"></a>
120121

121122
+ [Introduction](#introduction)
122123
+ [JWE Encryption and Decryption](#jwe-encryption-and-decryption)
123124
+ [Field Level Encryption and Decryption](#field-level-encryption-and-decryption)
124125

125126
#### Introduction <a name="introduction"></a>
126127

127-
This library supports 2 different types of encryption/decryption. Field level encryption (deprecated) and JWE encryption.
128+
This library supports 2 different types of encryption/decryption. Field level encryption (scheme designed before JWE was introduced) and JWE encryption.
128129

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

131132
+ [Introduction](#jwe-introduction)
132133
+ [Configuring the JWE Encryption](#configuring-the-jwe-encryption)
133134
+ [Performing JWE Encryption](#performing-jwe-encryption)
134135
+ [Performing JWE Decryption](#performing-jwe-decryption)
135-
+ [Encrypting Entire JWE Payloads](#encrypting-entire-jwe-payloads)
136-
+ [Decrypting Entire JWE Payloads](#decrypting-entire-jwe-payloads)
136+
+ [Encrypting Entire Payloads](#encrypting-entire-payloads-jwe)
137+
+ [Decrypting Entire Payloads](#decrypting-entire-payloads-jwe)
137138

138139
#### Introduction <a name="jwe-introduction"></a>
139140

141+
This library uses [JWE compact serialization](https://datatracker.ietf.org/doc/html/rfc7516#section-7.1) for the encryption of sensitive data.
140142
The core methods responsible for payload encryption and decryption are `encryptPayload` and `decryptPayload` in the `JweEncryption` class.
141143

142144
* `encryptPayload` usage:
@@ -231,7 +233,7 @@ Output:
231233
}
232234
```
233235

234-
#### Encrypting Entire JWE Payloads <a name="encrypting-entire-jwe-payloads"></a>
236+
#### Encrypting Entire Payloads <a name="encrypting-entire-payloads-jwe"></a>
235237

236238
Entire payloads can be encrypted using the "$" operator as encryption path:
237239

@@ -260,7 +262,7 @@ Output:
260262
}
261263
```
262264

263-
#### Decrypting Entire JWE Payloads <a name="decrypting-entire-jwe-payloads"></a>
265+
#### Decrypting Entire Payloads <a name="decrypting-entire-payloads-jwe"></a>
264266

265267
Entire payloads can be decrypted using the "$" operator as decryption path:
266268

0 commit comments

Comments
 (0)