npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

etz-encryptor

v1.0.0

Published

A package that allows you automatically generate the encrypted pin which you are to send with your Terminal ID when making your API calls to Etranzact's SwitchIT Infrastructure

Downloads

80

Readme

#Etz-Encryptor

Etz-Encryptor is a NodeJS package that allows you automatically generate the encrypted pin which you are to send with your Terminal ID when making your API calls to Etranzact's SwitchIT Infrastructure.

You can also find the etz-encryptor package on NPM, click HERE

Installation

To install the Etz-Encryptor package, all you have to do is run the command below in your terminal.

$ npm install etz-encryptor

Context

The etranzact SwitchIT infrastructure is an API for eTranzact's Corporate Payment Systems which when fully integrated allows clients to carry out funds trnasfer, perform utility bill payments, bulk transfers to recipients etc.

In order to utilize the API, eTranzact will provide you with the following:

  • Terminal ID
  • A pin
  • A MasterKey for pin Encryption

Traditionally, eTranzact will give you encryption references but they are focused on PHP, C# and Java.

This is where etz-encryptor comes in, it is focused on providing the same functionality to the NodeJS community

Usage

  1. Reference etz-encryptor in your project
const etzEncryptor = require('etz-encryptor)
  1. Utilize any of the available methods
const encryptedPin = etzEncryptor.generateEncryptedTerminalPin(plainPin, etzSecretKey)

This method takes 2 arguments, which are:

  • plainPin - The pin provided by eTranzact
  • etzSecretKey - The MasterKey provided by eTranzact

Example:

etzEncryptor.generateEncryptedTerminalPin('6543', 'yYx^Br&D@&403ljRsJojNK6T5JuJdU')

Output

The generateEncryptedTerminalPin method will output an encrypted string which will be in Base64 format

Example:

7Vv6uE8rA1h0mhpyB4CRRw==

To Do

This package is designed for projects where the need to input the pin every time is not an option, therefore it would be good to store the pin within the database.

It will be unwise to just save the encrypted pin in your database, thus the plan to create the following additional methods:

  • maskEncryptedTerminalPin (An encryption action to further hide the real Encrypted Pin)
  • unmaskEncryptedTerminalPin (An encryption action to decrypt the data)

Contribution

You are most welcome to provide any inputs that can improve the package.