Questions tagged [base64]

Questions about encoding/decoding file or stdin by using base64

Filter by
Sorted by
Tagged with
43 votes
5 answers
48k views

How can I get a base64 encoded shaX on the cli?

sha1sum outputs a hex encoded format of the actual sha. I would like to see a base64 encoded variant. possibly some command that outputs the binary version that I can pipe, like so: echo -n "message" |...
xenoterracide's user avatar
8 votes
1 answer
33k views

How do you convert a base64 utf-8 encoded string to a binary file from bash?

Is there a tool that will do this in bash?
leeand00's user avatar
  • 4,625
4 votes
1 answer
3k views

Javascript BTOA vs base64 in bash?

I need to convert a username and password combination into base64 before sending to an API. The javascript BTOA function is working for me, but when I try to use base64 command in bash I get slightly ...
Philip Kirkbride's user avatar
3 votes
4 answers
2k views

Replace a base64 value in a file in unix

I have a problem, I have a file test.txt that has a content like this: objectClass: CPM1 objectClass: CPM2 objectClass: CPM3 objectClass: CPM4 objectClass: CPZ objectClass: CP04s objectClass: CP0A ...
Sergio Jimenez's user avatar
2 votes
2 answers
5k views

How can I check the Base64 value for an integer?

I would like to check the Base64 value for an integer. There is a base64 linux command but I don't understand how I can apply it on integers. I have tried with base64 10 but then I get the error ...
Jonas's user avatar
  • 1,593
2 votes
2 answers
10k views

How to properly encode string based on json file?

I have the following basic.json file: { "user": "user", "pass": "password" } I'm trying to encode it in base64 like this: "Basic dXNlcjpwYXNzd29yZA==" I think I'm close: echo Basic $(echo ...
Washington Guedes's user avatar
1 vote
4 answers
7k views

How to decode base64 text in xml file in Linux?

I'm new in linux (shell). I need to decode base64 text in xml file using linux shell script. Could you please help me to write linux shell script for decoding the values of those tags where attribute ...
Meruyert's user avatar
0 votes
2 answers
307 views

Replace a base64 value from file

I have one file which is gets details from ldapsearch command and create file as below # lschuler, people, pl.s2-eu.XXXXXXXXX.local dn: uid=lschuler,ou=people,dc=pl,dc=s2-eu,dc=XXXXXXXXX,dc=local ...
Samurai's user avatar
  • 55
0 votes
2 answers
3k views

How to decode base64 text in ldif file in Linux?

I need to decode base64 embedded in ldif (openldap) backups. I found here a way to join lines starting with a blank. Then, based on this question about "How to decode base64 text in xml file in ...
elysch's user avatar
  • 131