Ivorde Unix/Linux/Database/Web/Mail Forum

View unanswered posts
View active topics
It is currently Sat Feb 04, 2012 9:55 pm


Tutorials applicable on more than one Unix/Linux OS and shell scripts: ssh / openssl / protocols.

Bookmark this article:

Author Message
debuser
  Post  Post subject: Openssl: Commandline base64 string encoding  |  Posted: Fri Mar 05, 2010 6:50 pm

Joined: Thu Aug 06, 2009 9:48 am
Posts: 90

Offline
Save on Delicious
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==


Top
admin
Post  Post subject: Re: Openssl: Commandline base64 string encoding  |  Posted: Wed Nov 09, 2011 6:07 pm
Site Admin

Joined: Mon Aug 03, 2009 3:43 pm
Posts: 25

Offline
Update: also the "base64" utility can be used:
Code:
#echo 'somepassword' | base64
c29tZXBhc3N3b3JkCg==


This utility needs to be installed separately on FreeBSD/Debian.


Top
Display posts from previous:  Sort by  
Print view

Topics related to - "Openssl: Commandline base64 string encoding"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Openssl s_client command line: connect and diagnose an https server

LaR3

0

5931

Wed Aug 26, 2009 10:18 am

LaR3 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
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 + 2 hours [ DST ]

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
DAJ Glass 2 template created by Dustin Baccetti

phpBB SEO