Module: Helpema::SSSS

Extended by:
Helpema, SSSS
Included in:
SSSS
Defined in:
lib/helpema/ssss.rb

Constant Summary

Constants included from Helpema

VERSION

Class Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpema

define_command, requires, run_command, to_arg

Class Attribute Details

.versionObject

Returns the value of attribute version.



4
5
6
# File 'lib/helpema/ssss.rb', line 4

def version
  @version
end

Instance Method Details

#combine(secrets:, threshold:, hexmode: false) ⇒ Object



39
40
41
42
# File 'lib/helpema/ssss.rb', line 39

def combine(secrets:, threshold:, hexmode:false)
  raise 'Need threshold number of secrets.' unless secrets.size >= threshold
  SSSS._combine(secrets:secrets, threshold:threshold, hexmode:hexmode)
end

#split(secret:, threshold:, shares:, token: nil, level: nil, hexmode: false) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/helpema/ssss.rb', line 17

def split(
secret:, threshold:,
shares:, token:nil,
level:nil,
hexmode:false
    ) = SSSS._split(
secret:secret,
threshold:threshold,
shares:shares,
token:token,
level:level,
hexmode:hexmode)