ecies-lite
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "ecies-lite", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A lightweight ECIES tool implemented in pure Node.JS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,4 +13,2 @@ # ecies-lite | ||
### ECIES | ||
```js | ||
@@ -24,4 +22,10 @@ const crypto = require('crypto'), | ||
let body = ecies.encrypt(publicKey, Buffer.from('This message is for demo purpose')); | ||
for (let k of Object.keys(body)) { | ||
console.log(`${k}(${body[k].length}B):`, body[k].toString('base64')); | ||
/** structure of ECIES body | ||
epk: ephemeral public key; | ||
iv: initialization vector for the cipher algorithm; | ||
ct: cipher text; | ||
mac: MAC value of the above fields along with the derived mac key; | ||
**/ | ||
for (let [k, v] of Object.entries(body)) { | ||
console.log(`${k}(${v.length}B):`, v.toString('base64')); | ||
} | ||
@@ -33,2 +37,5 @@ | ||
## Dependencies | ||
`crypto` module shipped with Node later than 6.x | ||
## License | ||
@@ -35,0 +42,0 @@ |
6571
43