Module: RecaptchaMailhide::Encrypt
- Defined in:
- lib/recaptcha_mailhide/encrypt.rb
Constant Summary collapse
- BLOCK_SIZE =
16- INITIALIZATION_VECTOR =
0.chr * 16
Class Method Summary collapse
-
.encrypt(string) ⇒ Object
Encrpyts the given string using AES 128 and returns the result in URL-safe Base64 form.
Class Method Details
.encrypt(string) ⇒ Object
Encrpyts the given string using AES 128 and returns the result in URL-safe Base64 form.
12 13 14 15 |
# File 'lib/recaptcha_mailhide/encrypt.rb', line 12 def self.encrypt(string) aes = build_aes urlsafe_base64(aes.update(pad_string(string)) + aes.final) end |