Page 1 of 1
base64_encode() & base64_decode() class?
Posted: Sat Dec 20, 2008 8:50 pm
by kaisellgren
Hi,
I'm looking for a class that can do base64_(encode/decode). I'm not in need of the function that PHP supports. I need this for educational purposes. If anyone has any ideas about a class that can do this I would like to know about it. (or other languages than PHP).
Re: base64_encode() & base64_decode() class?
Posted: Sat Dec 20, 2008 8:57 pm
by Luke
what's wrong with the built-in functions?

Re: base64_encode() & base64_decode() class?
Posted: Sat Dec 20, 2008 9:17 pm
by toasty2
I think he wants to learn how its done.
Re: base64_encode() & base64_decode() class?
Posted: Sat Dec 20, 2008 9:54 pm
by Chris Corbyn
The base64 encoding specification can be found in RFC 2045. I'm sure there's a more complete specification elsewhere but there's definitely one in RFC 2045.
Nobody is likely to have written one in PHP since the functions already exist, but you can find Java implementations (which should more or less read like OO PHP).
Here's one in Java:
http://www.source-code.biz/snippets/jav ... r.java.txt
Re: base64_encode() & base64_decode() class?
Posted: Sat Dec 20, 2008 9:56 pm
by Chris Corbyn
Re: base64_encode() & base64_decode() class?
Posted: Sun Dec 21, 2008 7:45 am
by kaisellgren
The Ninja Space Goat wrote:what's wrong with the built-in functions?

Yes like someone said after you, I am looking for that in terms of education. I want to know how it's done.
I found a few classes that are non-PHP. It would be easier if it's PHP, but well non-PHP is still better than nothing
@Chris Corbyn: Thanks for the links. I'll have a look at them.
Re: base64_encode() & base64_decode() class?
Posted: Sun Dec 21, 2008 8:55 pm
by Chris Corbyn
We have a user here called "Weirdan". He's posted base64 encoding/decoding algorithms here using JavaScript before if you find that easier to read than Java

It'll be in the "Code Snippets" forum if you want to search for the thread.
Re: base64_encode() & base64_decode() class?
Posted: Mon Dec 22, 2008 8:14 am
by kaisellgren
Chris Corbyn wrote:We have a user here called "Weirdan". He's posted base64 encoding/decoding algorithms here using JavaScript before if you find that easier to read than Java

It'll be in the "Code Snippets" forum if you want to search for the thread.
Thanks a bunch.