Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Fri Dec 01, 2023 2:15 pm


Username:
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
 
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation code
Confirmation code:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.
     

Topic review - Openssl: Commandline base64 string encoding
Author Message
Post subject: Re: Openssl: Commandline base64 string encoding  |  Post Posted: Wed Nov 09, 2011 11:07 am
Update: also the "base64" utility can be used:
Code:
#echo 'somepassword' | base64
c29tZXBhc3N3b3JkCg==


This utility needs to be installed separately on FreeBSD/Debian.
Post subject: Openssl: Commandline base64 string encoding  |  Post Posted: Fri Mar 05, 2010 11:50 am
To encode a string into base64, echo and openssl system utilities can be used:
Code:
# echo -n 'somepassword' | openssl enc -base64
c29tZXBhc3N3b3Jk


The -n switch to echo is used to supress echoing a new line character. For example, below is a difference between base64 encoded string that doesn't contain newline and on that does:
Code:
# echo -n 'somepassword' | openssl enc -base64
c29tZXBhc3N3b3Jk
# echo 'somepassword' | openssl enc -base64
c29tZXBhc3N3b3JkCg==
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO