0.0.19 • Published 4 years ago

crypto-data v0.0.19

Weekly downloads
48
License
MIT
Repository
github
Last release
4 years ago

Installation

    const encNdesc = require('crypto-data');

Usage

FI DATA ENC N DESC

Note: all functions promised based functions so either you can use await or then to handle the response.

FIU Generate ECDH keys

    let ECDHkeypair= await encNdesc.enc.generateKeyMaterial(eccUrl);
    /**
     * eccUrl = ECC base Url [default is http://localhost:8111]
    */

FIP Encryption

    let encryptedData=await encNdesc.FIPEncryption(id, Data, fiuKeyMaterialData, eccUrl);
    /**
     * id= fip ID
     * Data= FI Data
     * fiuKeyMaterialData= his KeyMaterial
     * eccUrl = ECC base Url 
    */

    Note :  we can use all Encryption functions calling by encNdesc.enc 

FIU Decryption

let decryptedFIUData=await encNdesc.dataDecrypt(cipher,hisKeyMaterial, myScrtKey,fiuNonce, eccUrl);
    /**
     * cipher= encrypted Data 
     * fiuKeyMaterialData= his KeyMaterial
     * myScrtKey= my ECDH privateKey
     * fiuNonce = my random 32-byte BASE64 string
     * opts = optional parameters Object 
    */
    Note : iv id depricated. need not pass iv as params inrenally it will took from cipher.

Version release summary

  1. 0.0.1
    1. this is extracted from finpro-crypto v0.0.14
  2. 0.0.2
    1. now onwards random nonce are integers only
  3. 0.0.3
    1. in FIPEncryption return object the params key is changed from object to empty string.
  4. 0.0.4
    1. revereted number nonce to Base64 encoded.
    2. Introduced ECC API Services for ECDH Key Pair, FI Data Encryption and Decryption. Deprecated the curve25519-n library.
    3. need to pass eccUrl as extra param for encryption , generate ecdh functions.
  5. 0.0.5
    1. ECC docker version changed.
  6. 0.0.6
    1. FI DB Data getting OoB now changed to AoB before doing Asnyc operations.
  7. 0.0.7
    1. unused libraries are removed from .json file.
  8. 0.0.8
    1. getting extra spaces after decryption for Encrypted FI. now its resolved.  now it will work for both JSON and XML.
    .... ....
  9. 0.0.13
    1. upgrading ECC service from v1 to v1.2. made changes in functions as per new ecc API's request and responses.
  10. 0.0.16
    1. in encryption previously we are passing base64 FI data now plain text with stringified is enough.
  11. 0.0.17
    1. in above encryption technique XMl string is stringfiying twice so implemented logic based typeof method stringifying.
  12. 0.0.18
    1. DHPublickey expiry time formate currently accepting Z only now we made changes to accept both Z and +0000 as suffix.
  13. 0.0.19
    1. keymaterials sequence
0.0.19

4 years ago

0.0.18

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago