If you just want simple encryption (not industrial strength!) you can code it yourself by using a simple substitution cypher (Google is your friend) or even something more basic such as adding characters to make a string of fixed length then chopping up/re-arranging or adding a fixed value (or variable value to each character).
In short there are lots of ways to do it if you just require simple encryption.
The usual way is not to use a reversible encryption, but rather a hash algorithm like MD5 (not very secure) or Blowfish or similar.
So you send the hash of the password and you know if the user typed the right password if the hash is the same than the one that was stored.