Skip to content

Commit c5de878

Browse files
authored
Update README.md
1 parent ed43c6a commit c5de878

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ NodeJS library for Mastercard API compliant payload encryption/decryption.
2424

2525
### Compatibility <a name="compatibility"></a>
2626

27-
NodeJS 6.12.3+
27+
- NodeJS 6.12.3+
2828

29-
There shouldn't be any Node compatibility issues with this package, but it's a good idea to keep your Node versions up-to-date. It is recommended that you use one of the LTS Node.js releases, or one of the more general recent releases. A Node version manager such as nvm (Mac and Linux) or nvm-windows is a good way to stay on top of this.
29+
There shouldn't be any Node compatibility issues with this package, but it's a good idea to keep your Node versions up-to-date. It is recommended that you use one of the LTS Node.js releases, or one of the more general recent releases. A Node version manager such as `nvm` (*Mac* and *Linux*) or `nvm-windows` is a good way to stay on top of this.
3030

3131
### References <a name="references"></a>
3232

@@ -75,14 +75,16 @@ The core methods responsible for payload encryption and decryption are `encryptD
7575
- `encrypt()` usage:
7676

7777
```js
78-
const fle = new require('mastercard-client-encryption').FieldLevelEncryption(config);
78+
const fle = new clientEncryption.FieldLevelEncryption(config);
79+
// ...
7980
let encryptedRequestPayload = fle.encrypt(endpoint, header, body);
8081
```
8182

8283
- `decrypt()` usage:
8384

8485
```js
85-
const fle = new require('mastercard-client-encryption').FieldLevelEncryption(config);
86+
const fle = new clientEncryption.FieldLevelEncryption(config);
87+
// ...
8688
let responsePayload = fle.decrypt(encryptedResponsePayload);
8789
```
8890

@@ -137,7 +139,7 @@ Call `FieldLevelEncryption.encrypt()` with a JSON request payload, and optional
137139
Example using the configuration [above](#configuring-the-field-level-encryption):
138140

139141
```js
140-
const string payload =
142+
const payload =
141143
{
142144
"path": {
143145
"to": {
@@ -149,6 +151,7 @@ const string payload =
149151
}
150152
};
151153
const fle = new (require('mastercard-client-encryption')).FieldLevelEncryption(config);
154+
// ...
152155
let responsePayload = fle.encrypt("/resource1", header, payload);
153156
```
154157

@@ -273,3 +276,4 @@ To use it:
273276
/* use response/data object here */
274277
});
275278
```
279+

0 commit comments

Comments
 (0)