Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rsecret

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rsecret

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Secret

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/secret. To experiment with that code, run bin/console for an interactive prompt.

TODO: Delete this and the text above, and describe your gem

Installation

Add this line to your application's Gemfile:

gem 'secret'

And then execute:

$ bundle

Or install it yourself as:

$ gem install secret

Usage

Configuration

config/initializers/setup_secret.rb

Secret.config do |conf|
  conf.aes_key = 'Your aes cbc mode secret key .'
  conf.aes_iv = 'Your aes cbc mode iv .'
  conf.aes_mode = Mode::AES_256_CBC # or AES_128_CBC
  conf.hash_mode = Mode::SHA_256 # or MD5
  # If encode_mode is nil ,it will not encode or decode msg
  conf.encode_mode = Mode::BASE_64
  # RSA pem file config
  conf.rsa_pub_key_path = 'Your rsa public pem file path'
  conf.rsa_pri_key_path = 'Your rsa private pem file path'
  conf.rsa_pwd = 'Your rsa private pem password'
end

AES CBC Mode

Secret::AES.encrypt msg
Secret::AES.decrypt cipher

RSA

Secret::RSA.encrypt msg
Secret::RSA.decrypt cipher
Secret::RSA.sign msg
Secret::RSA.verify_sign signature, origin

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/TedYin/secret. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Secret project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

FAQs

Package last updated on 19 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc