Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

base64(n) [redhat man page]

base64(n)						       base64 en- & decoding							 base64(n)

NAME
base64 - Procedures to encode and decode base64 SYNOPSIS
package require Tcl 8 package require base64 ?2.2.1? ::base64::encode ?-maxlen Imaxlen? ?-wrapchar wrapchar? string ::base64::decode string DESCRIPTION
This package provides procedures to encode binary data into base64 and back. ::base64::encode ?-maxlen Imaxlen? ?-wrapchar wrapchar? string Base64 encodes the given binary string and returns the encoded result. Inserts the character wrapchar every maxlen characters of output. wrapchar defaults to newline. maxlen defaults to 60. ::base64::decode string Base64 decodes the given string and returns the binary data. The decoder ignores whitespace in the string. KEYWORDS
encoding, base64 base64 2.2.1 base64(n)

Check Out this Related Man Page

ascii85(n)					       Text encoding & decoding binary data						ascii85(n)

__________________________________________________________________________________________________________________________________________________

NAME
ascii85 - ascii85-encode/decode binary data SYNOPSIS
package require Tcl 8.4 package require ascii85 ?1.0? ::ascii85::encode ?-maxlen maxlen? ?-wrapchar wrapchar? string ::ascii85::decode string _________________________________________________________________ DESCRIPTION
This package provides procedures to encode binary data into ascii85 and back. ::ascii85::encode ?-maxlen maxlen? ?-wrapchar wrapchar? string Ascii85 encodes the given binary string and returns the encoded result. Inserts the character wrapchar every maxlen characters of output. wrapchar defaults to newline. maxlen defaults to 76. Note well: If your string is not simple ascii you should fix the string encoding before doing ascii85 encoding. See the examples. The command will throw an error for negative values of maxlen, or if maxlen is not an integer number. ::ascii85::decode string Ascii85 decodes the given string and returns the binary data. The decoder ignores whitespace in the string, as well as tabs and newlines. EXAMPLES
% ascii85::encode "Hello, world" 87cURD_*#TDfTZ) % ascii85::encode [string repeat xyz 24] G^4U[H$X^H?a^]G^4U[H$X^H?a^]G^4U[H$X^H?a^]G^4U[H$X^H?a^]G^4U[H$X^H?a^]G ^4U[H$X^H?a^] % ascii85::encode -wrapchar "" [string repeat xyz 24] G^4U[H$X^H?a^]G^4U[H$X^H?a^]G^4U[H$X^H?a^]G^4U[H$X^H?a^]G^4U[H$X^H?a^]G^4U[H$X^H?a^] # NOTE: ascii85 encodes BINARY strings. % set chemical [encoding convertto utf-8 "Cu2088Hu2081u2080Nu2084Ou2082"] % set encoded [ascii85::encode $chemical] 6fN]R8E,5PiduUiduhZidua % set caffeine [encoding convertfrom utf-8 [ascii85::decode $encoded]] REFERENCES
[1] http://en.wikipedia.org/wiki/Ascii85 [2] Postscript Language Reference Manual, 3rd Edition, page 131. http://www.adobe.com/devnet/postscript/pdfs/PLRM.pdf BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category base64 of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
ascii85, encoding CATEGORY
Text processing COPYRIGHT
Copyright (c) 2010, Emiliano Gavilan base64 1.0 ascii85(n)
Man Page

10 More Discussions You Might Find Interesting

1. Programming

gunzip and base64 decode a string

I am writing a C program to get messages from a JMS queue into a string variable and then write them to a database. The messages are compressed (gzip) and encoded (base64), so I need to be able to perform gunzip and base64 decode inside the C. I don't want to write any of the messages to file so... (2 Replies)
Discussion started by: handak9
2 Replies

2. UNIX for Dummies Questions & Answers

I'm looking for someone who have Base64 binary

I need to install the base64 encryption method on a UNIX machine under AIX5.2. I've received a tar file but it is only C source , can you help me please. (sending me a binary base64 or to compile my source) Thanks by advance (3 Replies)
Discussion started by: Bruno_LAMOUR
3 Replies

3. UNIX for Dummies Questions & Answers

not able to run base64 exe

Hi, I have copied base64.exe under base64-1.3 folder and i am trying to run base64.exe from another folder called Request. But i am getting the following error message. mga.ksh: base64: not found Please let me know how to execute the base64.exe from a directory where it is not installed. ... (0 Replies)
Discussion started by: lotus123
0 Replies

4. UNIX for Dummies Questions & Answers

mailx saved messages are unreadable (base64)

I am trying to parse emails sent from a blackberry. I am using fetchmail to download email through IMAP from my exchange server and then forward to local Linux mail. (This part works fine.) When viewing and saving messages sent as plain text from Outlook, everything works fine. However, when... (1 Reply)
Discussion started by: Squeakygoose
1 Replies

5. UNIX for Dummies Questions & Answers

Why are there LFs in my base64?

And is there a good way of taking them out? I've been playing around a bit with using b64 to embed images in HTML (and trying to stay within the spec). I've noticed that with openssl's base64 encoder, the output files have newline characters @ every 65th column or so. This renders them useless,... (2 Replies)
Discussion started by: SilversleevesX
2 Replies

6. UNIX for Dummies Questions & Answers

Using SED to fix base64_decode attack/hack

last night our server was hit with an attack that infected every php file on the server and inserted the following code /*god_mode_on*/eval(base64_decode with a ton of other characters after. As it infected every php file i have been trying to clean it using a sed command to go through... (2 Replies)
Discussion started by: derrickyoung95
2 Replies

7. Shell Programming and Scripting

This function (decode64) runs on gawk but not on busybox awk

Hello, I'm trying to figure out a way to use a decode64 function in an embedded system who has few utilities, including busybox. Right now have something like this (taken from "google base64-and-base85-encoding-awk-scripts" sorry, I'm not able to post urls yet) _decode64() { &&... (4 Replies)
Discussion started by: chilicuil
4 Replies

8. Shell Programming and Scripting

Rearrange a file (2000 base64 strings in 1 row into 1 string by rows)

I have 1 row which contains abouts 20000 base64 string. e.g: /p4bdllBS8qcvW/69GUYej8nEv6gwt7UAYl0g==WZdjwTUQX9UEKsT/zWaZdQ==uI would like rearrange this file by base64 strings. So the output should be this ( 1 string in 1 row): 69GUYej8nEv6gwt7UAYl0g== WZdjwTUQX9UEKsT/zWaZdQ==How could I do... (4 Replies)
Discussion started by: freeroute
4 Replies

9. UNIX for Beginners Questions & Answers

Ldapsearch returning base64 encoded results

So my ldapsearch works great, except for some results I found today. My search is: /usr/lib64/mozldap/ldapsearch -T -h 10.1.1.1 -p 3891 -D "uid=datapower,ou=People,dc=blah,dc=com" -w xxxxxx -b "ou=Certs,dc=blah,dc=com"... (0 Replies)
Discussion started by: primerib
0 Replies

10. Shell Programming and Scripting

Base64 conversion in awk overlaps

hi, problem: output is not consistent as expected using external command in AWK description: I'm trying to convert $2 into a base64 string for later decoding, and for this when I use awk , I'm getting overlapped results , or say it results are not 100% correct. my code is: gawk... (9 Replies)
Discussion started by: busyboy
9 Replies