webfunds.token
Interface ParamsPair


public interface ParamsPair

Represents a pair of AbstractPrivateParams and AbstractPublicParams. Generation occurs here, and each is extracted separately. This class is not encoded, rather the Private and Public parts are separately extracted and stored. The model is like KeyPair.


Method Summary
 void generate(java.security.SecureRandom sr, byte[] item, byte[] series, long expiry, byte log)
          Create an uninitialised Pair.
 AbstractPrivateParams getPrivate()
          Get the private half of the pair, used for signing the token.
 AbstractPublicParams getPublic()
          Get the public half of the pair, used for verifying the token.
 

Method Detail

generate

public void generate(java.security.SecureRandom sr,
                     byte[] item,
                     byte[] series,
                     long expiry,
                     byte log)
              throws TokenKeyException
Create an uninitialised Pair. Call generate() with some params to make the contents. Reusable.
Parameters:
item - is the description of which instrument relates
series - is the short descriptor of which set of tokens this is
expiry - date on which this series will expire
log - the coin size, log base 2 of quantity

getPrivate

public AbstractPrivateParams getPrivate()
Get the private half of the pair, used for signing the token.

getPublic

public AbstractPublicParams getPublic()
Get the public half of the pair, used for verifying the token.