Sha256: cf062b77e1c0fb051b168eb623ebf2588cb3d8edecf0b656fc25a6f80236b6f9

Contents?: true

Size: 1.94 KB

Versions: 2

Compression:

Stored size: 1.94 KB

Contents

#
# Symmetric Encryption for Ruby
#
---
# For the development and test environments the test symmetric encryption keys
# can be placed directly in the source code.
# And therefore no RSA private key is required
development: &development_defaults
  key: 1234567890ABCDEF1234567890ABCDEF
  iv: 1234567890ABCDEF
  cipher: aes-128-cbc

test:
  <<: *development_defaults

release:
  # Since the key to encrypt and decrypt with must NOT be stored along with the
  # source code, we only hold a RSA key that is used to unlock the file
  # containing the actual symmetric encryption key
  private_rsa_key: |
<%= OpenSSL::PKey::RSA.generate(2048).to_s.collect { |line| "    #{line}" }.join('') %>

  # List Symmetric Key files in the order of current / latest first
  ciphers:
    -
      # Filename containing Symmetric Encryption Key encrypted using the
      # RSA public key derived from the private key above
      key_filename: <%= File.join(key_path, "#{app_name}_release.key") %>
      iv_filename:  <%= File.join(key_path, "#{app_name}_release.iv") %>
      cipher:       aes-256-cbc
      # Base64 encode encrypted data without newlines
      encoding:     base64strict

production:
  # Since the key to encrypt and decrypt with must NOT be stored along with the
  # source code, we only hold a RSA key that is used to unlock the file
  # containing the actual symmetric encryption key
  private_rsa_key: |
<%= OpenSSL::PKey::RSA.generate(2048).to_s.collect { |line| "    #{line}" }.join('') %>

  # List Symmetric Key files in the order of current / latest first
  ciphers:
    -
      # Filename containing Symmetric Encryption Key encrypted using the
      # RSA public key derived from the private key above
      key_filename: <%= File.join(key_path, "#{app_name}_production.key") %>
      iv_filename:  <%= File.join(key_path, "#{app_name}_production.iv") %>
      cipher:       aes-256-cbc
      # Base64 encode encrypted data without newlines
      encoding:     base64strict

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
symmetric-encryption-0.9.0 lib/rails/generators/symmetric_encryption/config/templates/symmetric-encryption.yml
symmetric-encryption-0.8.0 lib/rails/generators/symmetric_encryption/config/templates/symmetric-encryption.yml