0.0.10 • Published 1 year ago

md5-node-cg-lib v0.0.10

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

N|Solid

md5-node-cg-lib

The library can be downloaded from the following url: https://github.com/CloudGenUser/md5-node-cg-lib.git The downloaded must be Imported to the Project that is intended to be used

1. Introduction

This library allows generating an MD5 ID that can be used to identify and ensure if two objects are the same. With this validation the user can be sure of the integrity of the information that flows.

2. Library usage

The library can be installed from npm page with the next:

npm install md5-node-cg-lib, npm i md5-node-cg-lib or yarn install md5-node-cg-lib

2.1 Library Methods

Method getMd5ID

This method creates the "crypto" module that provides cryptographic functionality that includes a set of wrappers for OpenSSL hashing, HMAC, recording, decryption, signing, and verification functions. The algorithm depends on the available algorithms supported by the version of OpenSSL on the platform. Compute the digest of all passed data to be encrypted (using the hash.update() method)

3. Example

  1. VALIDATE OBJECTS

Validate the objects are correct

  1. GET LOCATION OF OBJECT

Get the path of Object

  1. RUN THE APP MD5

Run the app in development IDE.

  1. VALIDATE THE RUN IN THE LOG Validates in the log if the object was transformed through a message in the console where it shows the encryption of the String.
const getMd5ID = (content) => {
    try {
        return crypto.createHash('md5').update(content).digest("hex");
    } catch (error) {
        log.error(`Error Creating MD5 id: ${error}`);
        throw Error(error);
    }
}

The Result is:

Result MD5 id: d501194c987486789bb01b50dc1a0adb
0.0.10

1 year ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago