Posts

Showing posts from August, 2018

Digital signature in Node.js

What is a digital signature? In short it is a piece of data sent by the sender to the receiver to establish the identity of the sender. Upon receiving the data, receiver can identify if the sender is the one it says it is. It is made possible by making use of Asymmetric Cryptography . Sender encrypts some data with the private key, to generate the signature. The signature and public key will be sent to the receiver. Receiver decrypts the signature using the public key and compares the decrypted value, to the expected data (data encrypted by the sender). Both the sender and receiver has to agree beforehand, on what will be the data they would be using. Wiki Link:  Digital Signature Node.js Implementation - Sender const crypto = require('crypto'); const privateKey = `-----BEGIN RSA PRIVATE KEY-----MIICXQIBAAKBgQDCtTEic76GBqUetJ1XXrrWZcxd8vJr2raWRqBjbGpSzLqa3YLvVxVeK49iSlI+5uLX/2WFJdhKAWoqO+03oH4TDSupolzZrwMFSylxGwR5jPmoNHDMS3nnzUkBtdr3NCfq1C34fQV0iUGdlPtJai

How do I choose between swimming and running?

Image
                      VS  Both swimming and running are excellent forms of exercise. It is very difficult to pick one of the two. People usually do a mix of both or pick one based on their preference or goals. Comparison: Effect - Swimming is a full body exercise. In addition to leg kicking, upper body(arms and shoulders) also needs to work hard to drive forward. Running is more of a lower body exercise. Core needs to be strong to have a good running form. But while running, upper body is less used compared to lower body. Injury - Running is more injury prone. Gravity takes its toll while running. Every step during running, creates a reaction force from the ground which travels up the body and can lead to injuries. Depending on the running speed, the force can be up-to 4G (4 times the body weight). And for the same reason, lots of strength training should go with running. But while swimming, because of the buoyancy of water, gravity won’t cause any trouble. Hence swimmin