Sha256: 8e3426ab01ea20116869acf0fe3a794779b848c25b85dbcb80a856f31caa2994

Contents?: true

Size: 717 Bytes

Versions: 1

Compression:

Stored size: 717 Bytes

Contents

require "bundler/gem_tasks"
require "rake/testtask"

Rake::TestTask.new(:test) do |t|
  t.libs << "test"
  t.libs << "lib"
  t.test_files = FileList["test/**/*_test.rb"]
  t.warning = false
end

task default: :test

task :benchmark do
  require "securerandom"
  require "benchmark/ips"
  require "blind_index"
  require "scrypt"
  require "argon2"

  key = SecureRandom.random_bytes(32)
  value = "secret"

  Benchmark.ips do |x|
    x.report("pbkdf2_hmac") { BlindIndex.generate_bidx(value, key: key, algorithm: :pbkdf2_hmac) }
    x.report("scrypt") { BlindIndex.generate_bidx(value, key: key, algorithm: :scrypt) }
    x.report("argon2") { BlindIndex.generate_bidx(value, key: key, algorithm: :argon2) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blind_index-0.3.0 Rakefile