Sha256: ca5cfeb94ada873adcb271fa9f392f0d0a262aaeaf289ccf6f97b801c0594ade
Contents?: true
Size: 466 Bytes
Versions: 92
Compression:
Stored size: 466 Bytes
Contents
require 'flydata/command/base' require 'flydata/util/encryptor' module Flydata module Command class Encrypt < Base def run dp = flydata.data_port.get key = dp['key'] text = ask_password encrypted_text = Flydata::Util::Encryptor.encrypt(text, key) puts "Encrypted text: #{encrypted_text}" end private def ask_password ask("Enter text: ") { |x| x.echo = "*" } end end end end
Version data entries
92 entries across 92 versions & 1 rubygems