Base64 encode from hex

Encode base64 using rules from this rfc2045.
You must to do this: 
print base64(unhex($input));

IN

D35DB7E39EBBF3D001083105
1440C2040F7CEFAE78DF6D74
0123456789ABCDEF
FEDCBA9876543210
AAAAAABBBBBBCCCCCC
41424344
FFFF

OUT

0123456789ABCDEF
FEDCBA9876543210
ASNFZ4mrze8=
/ty6mHZUMhA=
qqqqu7u7zMzM
QUJDRA==
//8=

IN

D35DB7E39EBBF3D001083105

OUT

0123456789ABCDEF

IN

1440C2040F7CEFAE78DF6D74

OUT

FEDCBA9876543210

IN

0123456789ABCDEF

OUT

ASNFZ4mrze8=

IN

FEDCBA9876543210

OUT

/ty6mHZUMhA=

Input data needs "\n" at the end of the file.

Sat Jul 5 13:13:16 2014

It is may be not actual now. JAGC developers fix it problem.

Sun Feb 22 16:26:51 2015


Leave a comment

Parsed as Markdown

Login to leave a comment