3 added 302 characters in body
source | link

Convert the number into hex than use echo to print the according byte sequence and pipe that into base64. So to encode the integer 10 with base64, you can use:

echo -en '\xA' | base64

To explain the result. The byte 10 has the following binary representation:

00001010

What base64 does is, it chunks those into groups of 6 bits. So with padding we get the following two 6lets:

000010 100000

Which in decimal are 2 and 32, which correspond to the letters C and g.

Convert the number into hex than use echo to print the according byte sequence and pipe that into base64. So to encode the integer 10 with base64, you can use:

echo -en '\xA' | base64

Convert the number into hex than use echo to print the according byte sequence and pipe that into base64. So to encode the integer 10 with base64, you can use:

echo -en '\xA' | base64

To explain the result. The byte 10 has the following binary representation:

00001010

What base64 does is, it chunks those into groups of 6 bits. So with padding we get the following two 6lets:

000010 100000

Which in decimal are 2 and 32, which correspond to the letters C and g.

2 added 1 characters in body
source | link

Convert the number into hex than use echo to print the according byte sequence and pipe that into base64. So to encode the integer 10 with base64, you can use:

echo -nen '\xA' | base64

Convert the number into hex than use echo to print the according byte sequence and pipe that into base64. So to encode the integer 10 with base64, you can use:

echo -n '\xA' | base64

Convert the number into hex than use echo to print the according byte sequence and pipe that into base64. So to encode the integer 10 with base64, you can use:

echo -en '\xA' | base64
1
source | link

Convert the number into hex than use echo to print the according byte sequence and pipe that into base64. So to encode the integer 10 with base64, you can use:

echo -n '\xA' | base64