Skip to content
+91-7795206615
|
info@habilelabs.io

  • Home
  • About
  • Services
    • Custom Application Development
    • UI/UX Designing
    • Web Application Development
    • Offshore Product Services
    • Technical Outsourcing
    • ERP Services
  • Company
    • Careers
    • Case Studies
  • Specialization
    • Frontend Frameworks
      • Angular
      • ReactJS
      • VueJS
      • HTML / CSS
      • Javascript /Jquery
      • Bootstrap
      • Material design
    • Backend Frameworks
      • NodeJS
      • Meteor
      • GraphQL
      • Loopback
      • Salesforce
      • Spring Boot
      • Odoo
      • Laravel
    • Database / ORM
      • MySQL
      • PostgreSQL
      • Oracle
      • MongoDB
      • Google Firebase
      • Mongoose
      • Sequelize
      • Hibernate / JPA
    • Languages
      • Java Script
      • Dot Net
      • Java
      • Python
      • C / C++
      • PHP
      • AI / ML
      • Type Script
    • Mobile Frameworks
      • Ionic
      • Native Script
      • Native Android App
      • Native iOS App
      • Google Flutter
      • React Native
  • Blog
  • Hire Us

Encoding and decoding in communication process

Categories

  • Angular
  • Business Strategies
  • Cloud Services
  • CRM
  • Design Pattern
  • E-commerce
  • ERP Applications
  • Javascript
  • Meteor
  • Mobile development
  • Mongo DB
  • Node JS
  • Odoo
  • Our Partners
  • PHP
  • React
  • SAAS
  • Salesforce
  • SAP
  • Selenium
  • Tech stack Migration
  • Testing
  • UI-UX Design
  • Uncategorized
  • VAPT
  • Visualforce
  • Web Development
  • Web Security

Categories

  • Angular
  • Business Strategies
  • Cloud Services
  • CRM
  • Design Pattern
  • E-commerce
  • ERP Applications
  • Javascript
  • Meteor
  • Mobile development
  • Mongo DB
  • Node JS
  • Odoo
  • Our Partners
  • PHP
  • React
  • SAAS
  • Salesforce
  • SAP
  • Selenium
  • Tech stack Migration
  • Testing
  • UI-UX Design
  • Uncategorized
  • VAPT
  • Visualforce
  • Web Development
  • Web Security

What is Encoding and Decoding: Definition

In this post, we will discuss encoding decoding for the communication process.

Many times in the node.js application we need to encode and decode some data like password, secret key or any other important credentials. For that, we can use btoa and atob libraries. It provides to methods btoa() and atob() respectively.

btoa(decoded_data) = encoded_data
atob(encoded_data) = decoded_data

btoa library:

It converts binary data to base64-encoded ASCII.Simply install btoa npm library.

npm install btoa
Then require btoa into the file.

var btoa = require(‘btoa’);

Here you go to encode data.
Example :

var btoa = require('btoa');

var encoded = btoa("Habilelabs");

console.log("Encoded String : "+encoded);

Output :

Encoded String : SGFiaWxlbGFicw==

atob library:

It converts base64-encoded ASCII data back to binary.Simply install btoa npm library.
npm install atob

Then require atob into the file.

var atob = require(‘atob’);

Here you go to decode data.
Example :

var atob = require('atob');

var encoded = atob("SGFiaWxlbGFicw==");

console.log("Decoded String : "+encoded);

Output :

Decoded String : Habilelabs

We can encode and decode data with these two libraries easily.

If you have any issue in this process then simply ask in comment box. We also provide best web app development services.

Hope you enjoy this post, so don’t forget to share with friends.

Encoding & Decoding

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section]

Posted bypulkitAugust 2, 2016November 4, 2019Posted inWeb DevelopmentTags: Encoding & Decoding, What is Encoding and Decoding

Post navigation


:

Leave a comment

Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Cross-Database with Association in Postgres with Sequelize

    Cross-Database with Association in Postgres with Sequelize

  • How can You Improve Your Communication Skills – Effective Tips

    How can You Improve Your Communication Skills – Effective Tips

  • 5 Reasons that Make CRM Software Beneficial for Every Business

    5 Reasons that Make CRM Software Beneficial for Every Business

  • Do Low-Code Solutions have a Future in Web Development?

    Do Low-Code Solutions have a Future in Web Development?

  • A Revenue Management Reset in Consumer Goods

    A Revenue Management Reset in Consumer Goods

  • “Empowering your right-side brain” – Increasing Creativity

    “Empowering your right-side brain” – Increasing Creativity

Talk to our experts now

Have a project or looking for development team? Contact us.

Get a quote

About Us

Habilelabs Private Limited is the ISO 9001:2015 certified IT company, which has marked its flagship in 20+ countries with 100+ projects successfully

Company

  • About
  • Blog
  • Careers
  • Hire Us
  • Privacy Policy

Contact Us

  • +91-9828247415
  • +91-9887992695
  • info@habilelabs.io

Follow Us

Office

  • Habilelabs Private Limited
    4th Floor, I.G.M. School Campus,
    Sec-93 Agarwal Farm, Mansarovar,
    Jaipur, Rajasthan India
    Pin:302020