Sha256: 50a07b2d42f78422cc6ac0a46893f8961ad203e377faa560e1e6c0ee5411dd37

Contents?: true

Size: 667 Bytes

Versions: 10

Compression:

Stored size: 667 Bytes

Contents

# encoding: binary
# frozen_string_literal: true

RSpec.describe RbNaCl::PasswordHash::SCrypt do
  let(:reference_password) { vector :scrypt_password }
  let(:reference_salt)     { vector :scrypt_salt }
  let(:reference_opslimit) { RbNaCl::TEST_VECTORS[:scrypt_opslimit] }
  let(:reference_memlimit) { RbNaCl::TEST_VECTORS[:scrypt_memlimit] }
  let(:reference_digest)   { vector :scrypt_digest }

  it "calculates the correct digest for a reference password/salt" do
    digest = RbNaCl::PasswordHash.scrypt(
      reference_password,
      reference_salt,
      reference_opslimit,
      reference_memlimit
    )

    expect(digest).to eq reference_digest
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rbnacl-7.1.1 spec/rbnacl/password_hash/scrypt_spec.rb
rbnacl-7.1.0 spec/rbnacl/password_hash/scrypt_spec.rb
rbnacl-7.0.0 spec/rbnacl/password_hash/scrypt_spec.rb
rbnacl-6.0.1 spec/rbnacl/password_hash/scrypt_spec.rb
rbnacl-6.0.0 spec/rbnacl/password_hash/scrypt_spec.rb
rbnacl-5.0.0 spec/rbnacl/password_hash/scrypt_spec.rb
rbnacl-4.0.2 spec/rbnacl/password_hash/scrypt_spec.rb
rbnacl-4.0.1 spec/rbnacl/password_hash/scrypt_spec.rb
rbnacl-4.0.0 spec/rbnacl/password_hash/scrypt_spec.rb
rbnacl-4.0.0.pre spec/rbnacl/password_hash/scrypt_spec.rb