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

FAQ
It is currently Wed Oct 18, 2017 5:06 pm


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

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

Joined: Thu Aug 06, 2009 2:48 am
Posts: 105

Offline
 

Openssl: Commandline base64 string encoding

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 11:07 am
Site Admin

Joined: Mon Aug 03, 2009 8:43 am
Posts: 101

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


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

_________________
VPSie - SSD VPS servers in AMS-IX, LINX, DE-CIX
https://vpsie.com


Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "Openssl: Commandline base64 string encoding"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. How to list OpenSSL supported ciphers

mandrei99

0

944

Fri May 04, 2012 6:14 am

mandrei99 View the latest post

There are no new unread posts for this topic. Openssl s_client command line: connect and diagnose an https server

LaR3

0

2801

Wed Aug 26, 2009 3:18 am

LaR3 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can 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:  
cronNews 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