-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
31 lines (17 loc) · 813 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
== Encryption
== Introduction
A simple and useful way to encrypt strings. Useful for encrypting
strings in emails with urls links.
Usage
encrypted_string = Encryption.encrypt_aes('some string')
string = Encryption.decrypt_aes(encrypted_string)
Can also be used in object form
e = Encryption.new
cipher_text = e.encrypt_aes('some string to encrypt')
e.decrypt_aes(cipher_text)
I use configatron (available at github) to set the @@encryption_key however you could just as well add your own simple string here. I also considered making this key accessible via a writer, but decided against it as this could get confusing. Please let me know if you use this or find it useful! Thanks --mark
== License
MIT license.
== Author
Mark McDonald <[email protected]>
July 4th, 2009