Module: Sym

Included in:
App::Commands::BaseCommand, App::Commands::Decrypt, App::Commands::Encrypt, App::Commands::OpenEditor, App::PrivateKey::Decryptor, App::PrivateKey::Handler
Defined in:
lib/sym.rb,
lib/sym/app.rb,
lib/sym/data.rb,
lib/sym/errors.rb,
lib/sym/app/cli.rb,
lib/sym/version.rb,
lib/sym/app/args.rb,
lib/sym/constants.rb,
lib/sym/app/output.rb,
lib/sym/magic_file.rb,
lib/sym/application.rb,
lib/sym/app/cli_slop.rb,
lib/sym/app/commands.rb,
lib/sym/app/keychain.rb,
lib/sym/data/decoder.rb,
lib/sym/data/encoder.rb,
lib/sym/configuration.rb,
lib/sym/app/short_name.rb,
lib/sym/cipher_handler.rb,
lib/sym/app/output/base.rb,
lib/sym/app/output/file.rb,
lib/sym/app/output/noop.rb,
lib/sym/app/input/handler.rb,
lib/sym/app/output/stdout.rb,
lib/sym/app/password/cache.rb,
lib/sym/data/wrapper_struct.rb,
lib/sym/app/commands/decrypt.rb,
lib/sym/app/commands/encrypt.rb,
lib/sym/extensions/with_retry.rb,
lib/sym/app/commands/print_key.rb,
lib/sym/app/commands/show_help.rb,
lib/sym/app/password/providers.rb,
lib/sym/app/private_key/handler.rb,
lib/sym/extensions/with_timeout.rb,
lib/sym/app/commands/open_editor.rb,
lib/sym/app/private_key/detector.rb,
lib/sym/extensions/class_methods.rb,
lib/sym/app/commands/base_command.rb,
lib/sym/app/commands/generate_key.rb,
lib/sym/app/commands/show_version.rb,
lib/sym/app/private_key/decryptor.rb,
lib/sym/app/commands/show_examples.rb,
lib/sym/extensions/instance_methods.rb,
lib/sym/app/commands/bash_completion.rb,
lib/sym/app/commands/keychain_add_key.rb,
lib/sym/app/private_key/base64_decoder.rb,
lib/sym/app/private_key/key_source_check.rb,
lib/sym/app/commands/password_protect_key.rb,
lib/sym/app/password/providers/drb_provider.rb,
lib/sym/app/password/providers/memcached_provider.rb

Defined Under Namespace

Modules: App, CipherHandler, Constants, Data, Errors, Extensions Classes: Application, Configuration, MagicFile

Constant Summary collapse

VERSION =
'2.6.0'
DESCRIPTION =
"  Sym is a command line utility plus a straightforward Ruby API that makes it easy to \n  transparently handle sensitive data such as application secrets using symmetric\n  encryption with a 256bit key.\n \n  Unlike many modern encryption tools, sym focuses on the streamlined interface (CLI),\n  and offers many time-saving features that make encryption/decryption of application\n  secrets and other sensitive data as seamless as possible.   \n \n  You can encrypt the key itself with a password, for an additional layer of security.\n  You can choose to save the key to OS-X Keychain, making it difficult to get the key\n  when only disk is accessible. Using memcached or DRb sym can cache passwords so that\n  you don't have to retype it too often. Finally, the -t flag (edit mode) decrypts\n  the file on the fly, and lets you edit the unencrypted contents in $EDITOR. \n\n  Sym can read the key from many sources, including file, environment variable, \n  keychain, or CLI argument \u2014 all of the above become arguments of -k flag: one \n  flag to define the key no matter where it lives.\n\n  Finally, set environment variable SYM_ARGS to common flags you use, and then\n  have sym read these flags, activating this time-saving feature with -A flag.     \n   \n  Sym uses a symmetric aes-256-cbc cipher with a private key and an IV vector, \n  and is built atop of OpenSSL.\n"

Class Method Summary collapse

Class Method Details

.configObject



126
127
128
# File 'lib/sym.rb', line 126

def config
  Sym::Configuration.config
end

.default_keyObject



134
135
136
# File 'lib/sym.rb', line 134

def default_key
  File.read(default_key_file) rescue nil
end

.default_key?Boolean

Returns:

  • (Boolean)


138
139
140
# File 'lib/sym.rb', line 138

def default_key?
  File.exist?(default_key_file)
end

.default_key_fileObject



130
131
132
# File 'lib/sym.rb', line 130

def default_key_file
  config.default_key_file
end