reidmorrison / symmetric-encryption

Symmetric Encryption for Ruby Projects using OpenSSL

Home Page:https://logger.rocketjob.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect documentation for `encrypt`

samnissen opened this issue · comments

commented

Environment

  • Ruby 2.4.1
  • 4.2.0

Expected Behavior

SymmetricEncryption.encrypt("abc", random_iv=true, compress=false, type=:string) would accept the arguments as documented here.

Actual Behavior

$ irb
2.4.1 :001 > require 'symmetric-encryption'
 => true
2.4.1 :002 > SymmetricEncryption.encrypt("abc", random_iv=true, compress=false, type=:string)
ArgumentError: wrong number of arguments (given 4, expected 1)
	from /path/.rvm/gems/ruby-2.4.1@webdriver-user-agent/gems/symmetric-encryption-4.2.0/lib/symmetric_encryption/symmetric_encryption.rb:206:in `encrypt'
	from (irb):2
	from /path/.rvm/rubies/ruby-2.4.1/bin/irb:11:in `<main>'