Sha256: 722325d7c3aafe2fc40197a0ae064160945570f83e117d875f2cbddc107b44be

Contents?: true

Size: 650 Bytes

Versions: 2

Compression:

Stored size: 650 Bytes

Contents

# encoding: binary
require 'spec_helper'

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

  it "calculates the correct diest 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

2 entries across 2 versions & 1 rubygems

Version Path
rbnacl-3.1.1 spec/rbnacl/password_hash/scrypt_spec.rb
rbnacl-3.1.0 spec/rbnacl/password_hash/scrypt_spec.rb