Module: Helpema::SSSS
Constant Summary
Constants included from Helpema
Class Attribute Summary collapse
-
.version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #combine(secrets:, threshold:, hexmode: false) ⇒ Object
- #split(secret:, threshold:, shares:, token: nil, level: nil, hexmode: false) ⇒ Object
Methods included from Helpema
define_command, requires, run_command, to_arg
Class Attribute Details
.version ⇒ Object
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) |