Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

base64(1) [osx man page]

base64(1)						    BSD General Commands Manual 						 base64(1)

base64 -- Encode and decode using Base64 representation SYNOPSIS
base64 [-d | -h | -v | -D] [-b count] [-i input_file] [-o output_file] DESCRIPTION
base64 encodes and decodes Base64 data, as specified in RFC 4648. With no options, base64 reads raw data from stdin and writes encoded data as a continuous block to stdout. OPTIONS
The following options are available: -b count --break=count Insert line breaks every count characters. Default is 0, which generates an unbroken stream. -d --debug Print verbose log messages during processing. -D --decode Decode incoming Base64 stream into binary data. -h --help Print usage summary and exit. -i input_file --input=input_file Read input from input_file. Default is stdin; passing - also represents stdin. -o output_file --output=output_file Write output to output_file. Default is stdout; passing - also represents stdout. -v --version Print build version and exit. SEE ALSO
openssl(1), wikipedia page <>, RFC 4648 <> Mac OS X 10.7 February 8, 2011 Mac OS X 10.7

Check Out this Related Man Page

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


base64 - base64-encode/decode binary data SYNOPSIS
package require Tcl 8 package require base64 ?2.4.2? ::base64::encode ?-maxlen maxlen? ?-wrapchar wrapchar? string ::base64::decode string _________________________________________________________________ DESCRIPTION
This package provides procedures to encode binary data into base64 and back. ::base64::encode ?-maxlen maxlen? ?-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 76. Note well: If your string is not simple ascii you should fix the string encoding before doing base64 encoding. See the examples. The command will throw an error for negative values of maxlen, or if maxlen is not an integer number. ::base64::decode string Base64 decodes the given string and returns the binary data. The decoder ignores whitespace in the string. EXAMPLES
% base64::encode "Hello, world" SGVsbG8sIHdvcmxk % base64::encode [string repeat xyz 20] eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6 eHl6eHl6eHl6 % base64::encode -wrapchar "" [string repeat xyz 20] eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6 # NOTE: base64 encodes BINARY strings. % set chemical [encoding convertto utf-8 "Cu2088Hu2081u2080Nu2084Ou2082"] % set encoded [base64::encode $chemical] Q+KCiEjigoHigoBO4oKET+KCgg== % set caffeine [encoding convertfrom utf-8 [base64::decode $encoded]] 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 []. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
base64, encoding CATEGORY
Text processing COPYRIGHT
Copyright (c) 2000, Eric Melski Copyright (c) 2001, Miguel Sofer base64 2.4.2 base64(n)
Man Page

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

need help with FreeBSD!!!

Hi I want to write to my output_file using: if((fptr = creat(output_file, _S_IWRITE)) == -1) { printf("output_file..."..); return (1); } for(...) { _write(fptr, buffer, BUF_SIZE); } It says "_S_IWRITE" undeclared!!! Anybody knows what function I can use for that and what I... (3 Replies)
Discussion started by: lacasa
3 Replies

2. 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

3. 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

4. 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

5. UNIX for Advanced & Expert Users

GPRS Tunnelling Protocol implementation under UNIX

I need to implement a program that sends CDRs (just some data) over GTP' (GTP Prime - one of the GPRS Tunnelling Protocols, Does anybody know where I can find GTP implementation? I'v tryed OpenGGSN (, but... (4 Replies)
Discussion started by: Hitori
4 Replies

6. Shell Programming and Scripting

Sed options

I have a file with name input_file.spec. This file has records like: Record #: 1 rec_len = 590 rec_id = 31229 filler_4 = " " orig_id = 902162988 seqnum = 138960799 lrnid ... (3 Replies)
Discussion started by: Ajay_84
3 Replies

7. Shell Programming and Scripting

find a string and copy the string after that

Hi! just want to seek help on this: i have a file wherein i want to find a string and copy the string after that and paste that other string to a new file. ex: TOTAL 123456 find "TOTAL" and copy "123456" and paste "123456" to a new file NOTE: there are many "TOTAL" strings on that... (12 Replies)
Discussion started by: kingpeejay
12 Replies

8. Shell Programming and Scripting

Print 4th line back from regexp

I'm looking for a way to print the 4th line back from a regular expression. Kind of like the below but it has to be the 4th line before the regexp. Print the line immediately before regexp, but not the line containing the regexp. sed -n '/regexp/{g;1!p;};h' here is an example of logs(i... (11 Replies)
Discussion started by: senormarquez
11 Replies

9. UNIX for Dummies Questions & Answers

Need someone to decrypt an encoded text

Hello everybody, i have a big issue, i have to decode a big text in base64 a lot of times but there are 2 problems: i am a noob with unix system and shell, and i have problems with openssl and i can't decode anything. can anyone decode for me that base64? need a powerful computer, i can give some... (16 Replies)
Discussion started by: supermarco2020
16 Replies