• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

technion / ruby-argon2 / 13153238078

05 Feb 2025 08:24AM UTC coverage: 99.342%. Remained the same
13153238078

push

github

technion
Version bump to make new release

302 of 304 relevant lines covered (99.34%)

118.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/test/hash_format_test.rb
1
# frozen_string_literal: true
2

3
require 'test_helper'
4✔
4

5
class Argon2HashFormatTest < Minitest::Test
4✔
6
  PASSWORD = 'My secret password'
4✔
7
  OPTIONS = {
4✔
8
    t_cost: 4,
9
    m_cost: 12,
10
    p_cost: 3
11
  }.freeze
12

13
  TEMP = Argon2::Password.new(OPTIONS)
4✔
14
  DIGEST = TEMP.create(PASSWORD)
4✔
15

16
  def test_hash_format_variant
4✔
17
    assert argon2 = Argon2::HashFormat.new(DIGEST)
4✔
18

19
    assert_equal 'argon2id', argon2.variant
4✔
20
  end
21

22
  def test_hash_format_version
4✔
23
    assert argon2 = Argon2::HashFormat.new(DIGEST)
4✔
24

25
    assert_equal 19, argon2.version
4✔
26
  end
27

28
  def test_hash_format_t_cost
4✔
29
    assert argon2 = Argon2::HashFormat.new(DIGEST)
4✔
30

31
    assert_equal OPTIONS[:t_cost], argon2.t_cost
4✔
32
  end
33

34
  def test_hash_format_m_cost
4✔
35
    assert argon2 = Argon2::HashFormat.new(DIGEST)
4✔
36

37
    assert_equal (2**OPTIONS[:m_cost]), argon2.m_cost
4✔
38
  end
39

40
  def test_hash_format_p_cost
4✔
41
    assert argon2 = Argon2::HashFormat.new(DIGEST)
4✔
42

43
    assert_equal OPTIONS[:p_cost], argon2.p_cost
4✔
44
  end
45
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc