@@ -78,15 +78,15 @@ The core methods responsible for payload encryption and decryption are `encryptD
7878
7979``` js
8080const fle = new clientEncryption.FieldLevelEncryption (config);
81- // ...
81+ // …
8282let encryptedRequestPayload = fle .encrypt (endpoint, header, body);
8383```
8484
8585- ` decrypt() ` usage:
8686
8787``` js
8888const fle = new clientEncryption.FieldLevelEncryption (config);
89- // ...
89+ // …
9090let responsePayload = fle .decrypt (encryptedResponsePayload);
9191```
9292
@@ -153,7 +153,7 @@ const payload =
153153 }
154154};
155155const fle = new (require (' mastercard-client-encryption' )).FieldLevelEncryption (config);
156- // ...
156+ // …
157157let responsePayload = fle .encrypt (" /resource1" , header, payload);
158158```
159159
@@ -165,9 +165,9 @@ Output:
165165 "to" : {
166166 "encryptedFoo" : {
167167 "iv" : " 7f1105fb0c684864a189fb3709ce3d28" ,
168- "encryptedKey" : " 67f467d1b653d98411a0c6d3c(...) ffd4c09dd42f713a51bff2b48f937c8" ,
169- "encryptedData" : " b73aabd267517fc09ed72455c2(...) dffb5fa04bf6e6ce9ade1ff514ed6141" ,
170- "publicKeyFingerprint" : " 80810fc13a8319fcf0e2e(...) 82cc3ce671176343cfe8160c2279" ,
168+ "encryptedKey" : " 67f467d1b653d98411a0c6d3c… ffd4c09dd42f713a51bff2b48f937c8" ,
169+ "encryptedData" : " b73aabd267517fc09ed72455c2… dffb5fa04bf6e6ce9ade1ff514ed6141" ,
170+ "publicKeyFingerprint" : " 80810fc13a8319fcf0e2e… 82cc3ce671176343cfe8160c2279" ,
171171 "oaepHashingAlgorithm" : " SHA256"
172172 }
173173 }
@@ -186,7 +186,7 @@ Call `FieldLevelEncryption.decrypt()` with an (encrypted) `response` object with
186186Example using the configuration [ above] ( #configuring-the-field-level-encryption ) :
187187
188188``` js
189- ...
189+ …
190190const response = {};
191191response .request = { url: " /resource1" };
192192response .body =
@@ -195,10 +195,10 @@ response.body =
195195 " to" : {
196196 " encryptedFoo" : {
197197 " iv" : " e5d313c056c411170bf07ac82ede78c9" ,
198- " encryptedKey" : " e3a56746c0f9109d18b3a2652b76(...) f16d8afeff36b2479652f5c24ae7bd" ,
199- " encryptedData" : " 809a09d78257af5379df0c454dcdf(...) 353ed59fe72fd4a7735c69da4080e74f" ,
198+ " encryptedKey" : " e3a56746c0f9109d18b3a2652b76… f16d8afeff36b2479652f5c24ae7bd" ,
199+ " encryptedData" : " 809a09d78257af5379df0c454dcdf… 353ed59fe72fd4a7735c69da4080e74f" ,
200200 " oaepHashingAlgorithm" : " SHA256" ,
201- " publicKeyFingerprint" : " 80810fc13a8319fcf0e2e(...) 3ce671176343cfe8160c2279"
201+ " publicKeyFingerprint" : " 80810fc13a8319fcf0e2e… 3ce671176343cfe8160c2279"
202202 }
203203 }
204204 }
@@ -234,14 +234,14 @@ The **client-encryption-nodejs** library provides the `Service` decorator object
234234OpenAPI client can be generated, starting from your OpenAPI Spec / Swagger using the following command:
235235
236236``` shell
237- java -jar openapi-generator-cli.jar generate -i openapi-spec.yaml -l javascript -o out
237+ openapi-generator-cli generate -i openapi-spec.yaml -l javascript -o out
238238```
239239
240240Client library will be generated in the ` out ` folder.
241241
242242See also:
243243
244- - [ OpenAPI Generator (executable) ] ( https://mvnrepository.com/artifact/org.openapitools/openapi-generator-cli )
244+ - [ OpenAPI Generator CLI Installation ] ( https://openapi-generator.tech/docs/installation/ )
245245
246246##### Usage of the ` mcapi-service ` :
247247
@@ -270,12 +270,11 @@ To use it:
270270
271271 ``` js
272272 let api = service .ServiceApi ();
273- let merchant = /* ... */
273+ let merchant = /* … */
274274 api .createMerchants (merchant, (error , data , response ) => {
275275 // requests and responses will be automatically encrypted and decrypted
276276 // accordingly with the configuration used to instantiate the mcapi.Service.
277277
278278 /* use response/data object here */
279279 });
280- ```
281-
280+ ```
0 commit comments