I am looking at adding the Sentry plugin to one of the applications
that we are working on. I have a need to store some info that will
have to be encrypted and decrypted. I have been going through the
docs for the plugin and the AsymetricSentry class looks like the best
for what we need to do but I am not sure how to generate the key. The
This is a shortcut for using an asymmetrical algorithm with a private/
public key file. To use this, generate a public and
private key with Sentry::AsymmetricalSentry.save_random_rsa_key
(private_key_file, public_key_file). If you want to encrypt the
private key file with a symmetrical algorithm, pass a secret key
(neither the key nor the decrypted value will be stored).
public_key_file, :key => ‘secret_password’)
My question is this. I only want to generate this key once and set
the defaults in the environment.rb as mentioned in the docs. How do I
go about doing this? I am sure that the answer is probably very simple.