Encryption of the Data in Node JS for the Bank integration

Here is the encryption doing for the request body from the node js application const express = require(‘express’); const router = express.Router(); const axios = require(‘axios’).default; const mycrypto = require(“../../../javascript/crypto”); const fs = require(‘fs’); const path = require(‘path’); const aesjs = require(“aes-js”); const { RSA, Crypt } = require(‘hybrid-crypto-js’); const rsa = new RSA(); const… Continue reading Encryption of the Data in Node JS for the Bank integration

Hybrid decryption using node js

Here is an example of the decryption function which can be used for the decryption of the encrypted data const encryptedKey1 = fs.readFileSync( path.resolve(__dirname, “../../../../keys/encryptkey.txt”), “utf8”); const EN_PATH = path.resolve(__dirname, “../../../../keys/encrypt.txt”); const EN_KEY = fs.readFileSync(EN_PATH, “utf8”); var key = await mycrypto.decryptViaPrivateKey(encryptedKey1, GTEN_PRIKEY_PATH, PASS); const aescbc = new aesjs.ModeOfOperation.cbc(aesjs.utils.utf8.toBytes(key), “”); let _decryptedText = aescbc.decrypt(Buffer.from(EN_KEY, “base64”)); _decryptedText… Continue reading Hybrid decryption using node js

3 Reasons an Inefficient Cache Is Worse Than No Cache at All

Issues can be addressed with proper planning, an understanding of your application and its data needs, and proper caching strategy. At its core, database caching is a simple-enough concept: It is the practice of putting an in-memory datastore in front of (or aside) a database that acts as the system of record. Caching allows organizations… Continue reading 3 Reasons an Inefficient Cache Is Worse Than No Cache at All

5 Dashboard Design Best Practices

Though dashboards differ, they all have the same conceptual goal and purpose, consolidating information for a specific objective. In an increasingly data-driven world, the ability to summarize and display data while making it easy to understand and actionable is more important than ever. Dashboards appear in all types of software with various approaches behind their… Continue reading 5 Dashboard Design Best Practices

Published
Categorized as JavaScript

Top 5 Cutting-Edge JavaScript Techniques

From monads to pattern matching, we walk you through the latest and greatest JavaScript techniques for advanced developers. JavaScript is an essential tool in the world of modern web development and continues to change and evolve to set new standards. In this article, we focus on five cutting-edge JavaScript techniques to show developers new and… Continue reading Top 5 Cutting-Edge JavaScript Techniques

7 Best Chart Libraries For Developers In 2024 🤯

Many applications use charts or graphs for data visualization, which can be implemented using libraries or underlying technologies. Libraries offer time efficiency, a variety of chart types, and customization options. As a developer, understanding these options is crucial. While some projects might choose manual implementation, many benefit from the efficiency of chart libraries. Using these… Continue reading 7 Best Chart Libraries For Developers In 2024 🤯

Error Handling without the Result Class

Purposefully throwing errors can have several negative side effects to the readability and traceability of your code. In this article, we take a look at an alternative to how to handle errors within your Node.js + TypeScript applications. Do you ever find yourself wondering where exactly you should throw an error to be consumed by… Continue reading Error Handling without the Result Class

ECMAScript 2024 features you can use now

ECMAScript 2024 is expected to be finalized in June, but four new JavaScript features are already supported in browsers and Node.js. Here’s how to start using them today. The ECMAScript specification is like a portrait of the JavaScript language that is repainted every year. As is typical of modern JavaScript, the spec and real-world practice move… Continue reading ECMAScript 2024 features you can use now

5 ways to use JavaScript promises

Developers use JavaScript promises to model asynchronous operations in web and server-side programs. Here’s a quick look at five ways to use promises in your code. Promises are a central mechanism for handling asynchronous code in JavaScript. You will find them in many JavaScript libraries and frameworks, where they’re used to manage the results of an… Continue reading 5 ways to use JavaScript promises

Google translate static and dynamic contents

<!DOCTYPE html> <html lang=”en-US”> <body> <h1>My Web Page</h1> <p>Hello everybody!</p> <p>Translate this page:</p> <div id=”google_translate_element”></div> <script type=”text/javascript”> function googleTranslateElementInit() {   new google.translate.TranslateElement({pageLanguage: ‘en’}, ‘google_translate_element’); } </script> <script type=”text/javascript” src=”//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit”></script> </body> </html>