jsdsi
Class Threshold

java.lang.Object
  |
  +--jsdsi.Obj
        |
        +--jsdsi.Threshold
All Implemented Interfaces:
Subject

public class Threshold
extends Obj
implements Subject

A subject that can delegate authority to any K of N specified subjects. For example, if K is 2, N is 3, and the subjects are Alice, Bob, and Carol, any two of those subjects can pass on any authority granted to this subject (if delegation is permitted).

Author:
Sameer Ajmani

Nested Class Summary
 
Nested classes inherited from class jsdsi.Subject
Subject.Default
 
Constructor Summary
Threshold(Subject[] s, int t)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Subject[] getSubjects()
           
 int getThreshold()
           
 int hashCode()
           
(package private) static Threshold parseThreshold(SexpList l)
           
(package private) static Threshold parseThreshold(SexpList l, Principal issuer)
           
 SexpList toSexp()
           
 SexpList toSexp(Principal iss)
           
 
Methods inherited from class jsdsi.Obj
parseObj, parseObj, toByteArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Threshold

public Threshold(Subject[] s,
                 int t)
Method Detail

getThreshold

public int getThreshold()

getSubjects

public Subject[] getSubjects()

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in class Obj

hashCode

public int hashCode()
Specified by:
hashCode in class Obj

toSexp

public SexpList toSexp()
Specified by:
toSexp in interface Subject
Specified by:
toSexp in class Obj

toSexp

public SexpList toSexp(Principal iss)

parseThreshold

static Threshold parseThreshold(SexpList l)
                         throws SexpParseException
SexpParseException

parseThreshold

static Threshold parseThreshold(SexpList l,
                                Principal issuer)
                         throws SexpParseException
SexpParseException