Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Encrypt And Decrypt Data In A Golang Application With The Crypto Packages

Being able to encrypt and decrypt data within an application is very useful for a lot of circumstances. Let’s not confuse encryption and decryption with hashing like that found in a bcrypt library, where a hash is only meant to transform data in one direction.

Not too long ago I wrote about in a previous article how to encrypt and decrypt data using Node.js. This was partially inspired by me learning how to build software wallets for cryptocurrencies and encrypting the sensitive information. However, what if we wanted to use Go instead of Node.js?

We’re going to take a look at encrypting data and then decrypting it within a Go application by using the already available crypto packages.

Read More

Encrypt And Decrypt Data In Node.js With The Crypto Library

As you’ve probably noticed from the previous few articles, I’ve been doing a lot of development around cryptocurrency wallets using Node.js. Up until now, I’ve only been writing about interacting with different currencies. However, I haven’t discussed how to safely store your wallet information.

When it comes to storing anything sensitive, whether it be cryptocurrency secrets or something else, you must do so safely and securely. For example, the data must be encrypted at rest and decrypted when used.

We’re going to see how to encrypt data with a passphrase using Node.js and decrypt it using that same passphrase when necessary.

Read More

Consume Remote API Data From Within A Node.js Application

Not too long I wrote about consuming remote API data using Golang. However, as you know, I’m also a heavy Node.js developer as well. So how do we issue HTTP requests from within a Node.js application and why might you want to. The simple answer is that you might want to consume someone else’s data within your web application and you can’t just do that like you would in a browser-based application using Ajax or similar.

We’re going to see how to make HTTP requests possible within Node.js.

Read More

Getting Familiar with Gulp for Workflow Automation

I’ve been developing web applications for as long as I can remember and there are certain repetitive tasks that I do between the development and deployment of each final product. For example, current web standards demand that web resources like CSS, and JavaScript be minified or images be compressed. We could easily do this by hand or with helper applications, but why would you want to?

Instead, repetitive tasks can, and should, be transformed into an automated workflow, something that is particularly useful when it comes to continuous integration and continuous deployment.

We’re going to see how to create a an automated workflow using the Gulp toolkit to do simple tasks like cleaning, minification, copying, altering, and even deploying projects.

Read More

Unit Testing a Node.js Application with the Jasmine Testing Framework

When building an application, regardless if it is mobile, web, or neither, it is a good idea to come up with a collection of tests that can be used in a continuous integration scenario. I must admit, I don’t have the best habits when it comes to writing tests, but I’m sure my applications would be significantly better if I did.

Previously I had written about unit testing in Golang as well as unit testing in NativeScript with Angular. This time around it makes sense to talk about writing tests in Node.js, another technology that I have in my tool belt.

Read More

Consume RESTful API Endpoints Within A Golang Application

I am a huge fan of the Go programming language and have written a decent amount of material on the subject. For example, a popular tutorial I wrote titled, Create a Simple RESTful API with Golang, focuses on developing an API. However, I recently received questions on the subject of consuming data from other APIs from within a Go application.

We’re going to see how to issue HTTP requests from within Go, in an effort to consume or send data to other RESTful APIs that might exist on the internet.

Read More

Using Network Sockets With The Go Programming Language

A few months back I wrote about using websockets in a Golang application for communication with an Angular client web application. While very useful and simplistic, in many cases websockets won’t be the means for real-time communication between applications. It is often easier or better to use standard TCP network sockets as an alternative. For example, if you’re developing an online video game, it will likely communicate to the server using TCP sockets rather than websockets.

We’re going to see how to create a basic chat application using the Go programming language. This chat application will have a server for listening and routing client communications and a client for sending and receiving messages from the server.

Read More