Skip to content

bx base64 encode

evoskuil edited this page Dec 12, 2014 · 5 revisions

Convert binary data to Base64.

$ bx base64-encode --help
Usage: bx base64-encode [-h] [--config VALUE] [DATA]                     

Info: Convert binary data to Base64.                                     

Options (named):

-c [--config]        The path to the configuration settings file.        
-h [--help]          Get a description and instructions for this command.

Arguments (positional):

DATA                 The binary data to encode as Base64. This can be    
                     text or any other data. If not specified the data is
                     read from STDIN.

See also base64-decode.

Example 1

$ bx base64-encode "Let us speak no more of faith in man, but bind him down from mischief by the chains of cryptography."
TGV0IHVzIHNwZWFrIG5vIG1vcmUgb2YgZmFpdGggaW4gbWFuLCBidXQgYmluZCBoaW0gZG93biBmcm9tIG1pc2NoaWVmIGJ5IHRoZSBjaGFpbnMgb2YgY3J5cHRvZ3JhcGh5Lg==

Example 2

RFC4648 Test Vector

$ bx base64-encode foobar
Zm9vYmFy

BX Menu

Clone this wiki locally