You can use encrypted_stringsgem:
data = 'Whackabad'
password = 'Holycrap'
encrypted = data.encrypt(:symmetric, :algorithm => 'des-ecb', :password => password)
encrypted.decrypt(:symmetric, :algorithm => 'des-ecb', :password => password)
This solution does not encrypt and does not save the password anywhere - it encrypts this data, and only those who know the password will be able to decrypt the data.
This is a good solution if you do not want anyone (including the site administrator) to decrypt the data without the correct password.