Wednesday, June 20, 2007

Encryption is Serious Stuf...What is Base64


" Base64 is a system for representing an array of bytes as ASCII characters. This is useful, for example, when you want to send raw byte data through a medium, like email, that may not support anything but 7-bit ASCII. The base64 system is fully described in RFC 1521, in section 5.2. You can download this document from ftp://ds.internic.net/rfc/rfc1521.txt. It's another number system, just like octal or hexadecimal. Whereas octal uses three bits per digit and hexadecimal uses four, base64 uses six bits per digit. Fortunately, there are two undocumented Java classes that take care of all the details. sun.misc.BASE64Encoder takes an array of bytes and generates a String containing the base64 digits. A corresponding class, sun.misc .BASE64Decoder, takes a String and produces the original byte array. These classes are undocumented, so Sun has no obligation to support them or keep them around in future releases of Java. If you don't have the sun.misc classes available, Appendix B, has listings for base64 conversion classes that can be used for the examples in this chapter. Once you have entered and compiled the base64 classes, replace the import sun.misc.* Encrypted data is converted to base64 to be sent through the Internet, since many mailers only support ASCII. "

Wonder why Iam saying this? Well you would be looking at a screenshot like the following shortly. Yes I have started working on a similar project and more features would be included depending the seriousness of the features it lacks.....Lolz....



No comments: