RSSAmplifier

Shorts · Oct 22, 2018

Strong Encryption Keys for Rails

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

Encryption is a common way to protect sensitive data. Generating a secure key is an important part of the process. attr_encrypted , the popular encryption library for Rails, uses AES-256-GCM by default, which takes a 256-bit key. So how can we generate a secure one? If you’re in a hurry, feel free to skip to the answer . Take 1 One way to generate a key is: SecureRandom.base64(32).first(32) This…

Read on ankane.org

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.