Module: Helpema::SSSS
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 Piper
define_command, run_command, to_arg, validate_command
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
43 44 45 46 |
# File 'lib/helpema/ssss.rb', line 43 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
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/helpema/ssss.rb', line 21 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) |