# File lib/captcha/cipher.rb, line 29 def self.decrypt(text) # Decode chr coded string encrypted = text.split('_').collect do |x| x.to_i.chr end encrypted = encrypted.join('') # Decrypt cipher = OpenSSL::Cipher::Cipher.new("aes-256-cbc") cipher.decrypt cipher.key = @@key cipher.iv = @@iv decrypted = cipher.update(encrypted) decrypted << cipher.final end