jmazzi / crypt_keeper

Transparent ActiveRecord encryption
http://jmazzi.github.com/crypt_keeper/
MIT License
288 stars 99 forks source link

Feature Request: Sorting encrypted attributes #165

Closed creativetags closed 5 years ago

creativetags commented 6 years ago

Could we have a way to sort a query like:

User.all.order(:name, :asc)

In my case I'm using mysql_aes_new

I understand the SQL would look something like:

SELECT AES_DECRYPT(FROM_BASE64(name), "MYPASSPHRASE") AS name FROM users ORDER BY name ASC;