Tool to encrypt/decrypt with UUEncode. UUEncode (for Unix to Unix Encoding) is a symmetric encryption based on conversion of binary data (split into 6-bit blocks) into ASCII characters.
UUencode - dCode
Tag(s) : Character Encoding
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
UUEncoding is an algorithm for converting binary data into ASCII text available by default on Unix/Linux operating systems.
Uuencode encoding is able to encode any binary string using 65 ASCII characters (from 32 to 96):
(space)!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`
A message encrypted by uuencode begins with begin (mode) (name) where (mode) is the value of the access rights to the Unix file and (name) is the name of the file that will be created at decoding.
Example: begin 664 dcode.txt will create a file named dcode.txt with access rights 664.
A message encoded by uuencode ends with a line containing only end.
The encoding consists of reading the binary data (stream or file) divided by a group of 3 bytes (ie 24 bits, possibly supplemented by bits at 0 at the end if necessary). These 24 bits are themselves divided into 4 groups of 6 bits. And each 6-bit group (having a binary value between 000000 and 111111) is converted to decimal (a number between 0 and 63 in base 10).
The encoding table is similar to the ASCII table but shifted by 32 and limited to 64 characters.
The encoding program also adds, at the very beginning of each line of text produced, the character count / bytes count encoded in this line; This count (from 1 to 45) is itself encoded (by adding 32 to itself) before being converted to an ASCII character. The maximum allowed size of the lines produced is therefore 61 characters (1 character for the initial length plus 60 characters encoding 45 bytes).
Example: Encoding dCode is translated %9$-O9&4`
Decryption by UUEncode (uudecode) applies by lines.
Example: A message have been uuencoded %9$-O9&4`
The first character of each line corresponds to the number of characters in the line.
Example: % is the 5th character of the UUEncode alphabet (0-index), the plain message will contain 5 bytes.
The other characters must be treated in groups of 4.
Example: The first group of 4 characters is 9$-O
Write the position of each character in the alphabet and convert this position to binary (6 bits) to obtain 24 bits.
Example: 9 is at position 25 or 011001 in 6-bit binary, $ is at position 4 either 000100, etc.
Example: 9$-O therefore corresponds to these 24 bits: 011001 000100 001101 101111
The 24 bits are then divided into 3 bytes (of 8 bits). These 3 bytes are those of the original data.
Example: 011001 000100 001101 101111 becomes 01100100 01000011 01101111 which are the ASCII values of d, C and o, respectively.
Example: Finally, the encrypted message '%9$-O9&4` corresponds to the plain message dCode.
The message should normally start with begin and end with end (but this is not mandatory).
If it starts with begin, it is followed by a triplet of octal digits, usually 644, 755 or 777
The message consists of up to 65 distinct characters.
The UUDeview program uses UUEncode.
UU is short for Unix to Unix Encoding.
Technically it is possible to use another alphabet but this is no longer really UUEncode.
There are other similar techniques for encoding, the best known is Base64, complementary with a MIME type for file sending over the Internet.
dCode retains ownership of the "UUencode" source code. Except explicit open source licence (indicated Creative Commons / free), the "UUencode" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "UUencode" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "UUencode" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.
The copy-paste of the page "UUencode" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
UUencode on dCode.fr [online website], retrieved on 2024-12-30,