@@ -91,17 +91,17 @@ Reading PEM encoded keys requires an additional step:
9191### Performing Field Level Encryption and Decryption <a name =" performing-field-level-encryption-and-decryption " ></a >
9292The methods that do all the heavy lifting are ` encryptPayload ` and ` decryptPayload ` in the ` FieldLevelEncryption ` class.
9393
94- ` encryptPayload ` usage:
94+ * ` encryptPayload ` usage:
9595``` java
9696String encryptedRequestPayload = FieldLevelEncryption . encryptPayload(requestPayload, config);
9797```
9898
99- ` decryptPayload ` usage:
99+ * ` decryptPayload ` usage:
100100``` java
101101String responsePayload = FieldLevelEncryption . decryptPayload(encryptedResponsePayload, config);
102102```
103103
104- #### Configuring the Field Level Encryption
104+ #### Configuring the Field Level Encryption < a name = " configuring-the-field-level-encryption " ></ a >
105105Use the ` FieldLevelEncryptionConfigBuilder ` to create ` FieldLevelEncryptionConfig ` instances. Example:
106106``` java
107107FieldLevelEncryptionConfig config = FieldLevelEncryptionConfigBuilder . aFieldLevelEncryptionConfig()
@@ -123,7 +123,7 @@ See also [FieldLevelEncryptionConfig.java](https://github.com/Mastercard/client-
123123
124124Call ` FieldLevelEncryption.encryptPayload ` with a JSON request payload and a ` FieldLevelEncryptionConfig ` instance.
125125
126- Example using the configuration above:
126+ Example using the configuration [ above] ( #configuring-the-field-level-encryption ) :
127127
128128* Request payload:
129129``` json
@@ -146,8 +146,8 @@ Example using the configuration above:
146146 "to" : {
147147 "encryptedFoo" : {
148148 "iv" : " 7f1105fb0c684864a189fb3709ce3d28" ,
149- "encryptedKey" : " 67f467d1b653d98dddd7eea5ae411a0c6d3c (...)ffd4c09dd42f713b6b39313503be179bae18a51bff2b48f937c8 " ,
150- "encryptedValue" : " b73aabd267517f79c54e84ff01d8bc09ed72455c2 (...)dffb5fa04bf4ca4fff907d67072a75b076e6ce9ade1ff514ed6141 " ,
149+ "encryptedKey" : " 67f467d1b653d98411a0c6d3c (...)ffd4c09dd42f713a51bff2b48f937c8 " ,
150+ "encryptedValue" : " b73aabd267517fc09ed72455c2 (...)dffb5fa04bf6e6ce9ade1ff514ed6141 " ,
151151 "oaepHashingAlgorithm" : " SHA256"
152152 }
153153 }
@@ -159,23 +159,25 @@ Example using the configuration above:
159159
160160Call ` FieldLevelEncryption.decryptPayload ` with a JSON response payload and a ` FieldLevelEncryptionConfig ` instance.
161161
162- Encrypted response payload:
162+ Example using the configuration [ above] ( #configuring-the-field-level-encryption ) :
163+
164+ * Encrypted response payload:
163165``` json
164166{
165167 "path" : {
166168 "to" : {
167169 "encryptedFoo" : {
168170 "iv" : " e5d313c056c411170bf07ac82ede78c9" ,
169- "encryptedKey" : " e3a56746c0f9109d18b3a2d91619e6cac8c7b09652b76 (...)f16d8af7e006440f17677eaaeff36b2479652f5c24ae7bd " ,
170- "encryptedValue" : " 809a09d78257af5379df0c454dfa9c32ecf5787430775ebcf (...)409d8d27ab29803353cded59fe72fd4a7735c69da4080e74f " ,
171+ "encryptedKey" : " e3a56746c0f9109d18b3a2652b76 (...)f16d8afeff36b2479652f5c24ae7bd " ,
172+ "encryptedValue" : " 809a09d78257af5379df0c454dcdf (...)353ed59fe72fd4a7735c69da4080e74f " ,
171173 "oaepHashingAlgorithm" : " SHA256"
172174 }
173175 }
174176 }
175177}
176178```
177179
178- Response payload:
180+ * Response payload:
179181``` json
180182{
181183 "path" : {
0 commit comments