If this is a hobby project then please continue, if it's not then DON'T implement your own encryption. Encryption can be very hard to implement and much expert knowledge is necessary.
In the case of hobby: You can look at ROT13 as an example.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.