webfunds.token.algorithm
Class AbstractToken

java.lang.Object
  |
  +--webfunds.token.algorithm.AbstractToken
Direct Known Subclasses:
ChaumToken, RandomToken

public abstract class AbstractToken
extends java.lang.Object
implements webfunds.token.algorithm.AbstractTokenInterface

Class description


Constructor Summary
AbstractToken()
           
 
Method Summary
 void decode(byte[] data, int start, int len)
           
protected abstract  void decodeImpl(byte[] data, int start, int len)
           
 byte[] encode()
           
protected abstract  byte[] encodeImpl()
           
 byte getAbstractMajorVersion()
           
 byte getAbstractMinorVersion()
           
 byte[] getCurrencyID()
           
 byte getImplementationMajorVersion()
           
 byte getImplementationMinorVersion()
           
 byte[] getSeries()
           
 byte[] getServerChallenge(java.security.SecureRandom sr, AbstractPrivateTokenParameters privparams)
           
abstract  byte[] getUniqueID()
           
 long getValue()
           
 boolean needsServerChallenge()
           
 void setAbstractMajorVersion(byte x)
           
 void setAbstractMinorVersion(byte x)
           
 void setCurrencyID(byte[] x)
           
 void setImplementationMajorVersion(byte x)
           
 void setImplementationMinorVersion(byte x)
           
 void setSeries(byte[] x)
           
 void setValue(long x)
           
 void unblind(byte[] blindedcoin, int startb, int lenb, byte[] locallysaveddata, int startl, int lenl, java.security.SecureRandom sr, AbstractPublicTokenParameters pubparams)
           
protected abstract  void unblindImpl(byte[] blindedcoin, int startb, int lenb, byte[] locallysaveddata, int startl, int lenl, java.security.SecureRandom sr, AbstractPublicTokenParameters pubparams)
           
abstract  boolean verifyPrivate(AbstractPrivateTokenParameters privparams)
           
abstract  boolean verifyPublic(AbstractPublicTokenParameters pubparams)
           
 boolean verifyServerResponse(byte[] response, java.security.SecureRandom sr, AbstractPrivateTokenParameters privparams)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractToken

public AbstractToken()
Method Detail

unblindImpl

protected abstract void unblindImpl(byte[] blindedcoin,
                                    int startb,
                                    int lenb,
                                    byte[] locallysaveddata,
                                    int startl,
                                    int lenl,
                                    java.security.SecureRandom sr,
                                    AbstractPublicTokenParameters pubparams)
                             throws DataFormatException,
                                    UnsupportedVersionException

unblind

public final void unblind(byte[] blindedcoin,
                          int startb,
                          int lenb,
                          byte[] locallysaveddata,
                          int startl,
                          int lenl,
                          java.security.SecureRandom sr,
                          AbstractPublicTokenParameters pubparams)
                   throws DataFormatException,
                          UnsupportedVersionException

decodeImpl

protected abstract void decodeImpl(byte[] data,
                                   int start,
                                   int len)
                            throws DataFormatException,
                                   UnsupportedVersionException

decode

public final void decode(byte[] data,
                         int start,
                         int len)
                  throws DataFormatException,
                         UnsupportedVersionException

getUniqueID

public abstract byte[] getUniqueID()

verifyPublic

public abstract boolean verifyPublic(AbstractPublicTokenParameters pubparams)

verifyPrivate

public abstract boolean verifyPrivate(AbstractPrivateTokenParameters privparams)

encodeImpl

protected abstract byte[] encodeImpl()

encode

public final byte[] encode()

needsServerChallenge

public boolean needsServerChallenge()

getServerChallenge

public byte[] getServerChallenge(java.security.SecureRandom sr,
                                 AbstractPrivateTokenParameters privparams)

verifyServerResponse

public boolean verifyServerResponse(byte[] response,
                                    java.security.SecureRandom sr,
                                    AbstractPrivateTokenParameters privparams)

getAbstractMajorVersion

public final byte getAbstractMajorVersion()
Specified by:
getAbstractMajorVersion in interface webfunds.token.algorithm.AbstractTokenInterface

getAbstractMinorVersion

public final byte getAbstractMinorVersion()
Specified by:
getAbstractMinorVersion in interface webfunds.token.algorithm.AbstractTokenInterface

getImplementationMajorVersion

public final byte getImplementationMajorVersion()
Specified by:
getImplementationMajorVersion in interface webfunds.token.algorithm.AbstractTokenInterface

getImplementationMinorVersion

public final byte getImplementationMinorVersion()
Specified by:
getImplementationMinorVersion in interface webfunds.token.algorithm.AbstractTokenInterface

getCurrencyID

public final byte[] getCurrencyID()
Specified by:
getCurrencyID in interface webfunds.token.algorithm.AbstractTokenInterface

getSeries

public final byte[] getSeries()
Specified by:
getSeries in interface webfunds.token.algorithm.AbstractTokenInterface

getValue

public final long getValue()
Specified by:
getValue in interface webfunds.token.algorithm.AbstractTokenInterface

setAbstractMajorVersion

public final void setAbstractMajorVersion(byte x)
Specified by:
setAbstractMajorVersion in interface webfunds.token.algorithm.AbstractTokenInterface

setAbstractMinorVersion

public final void setAbstractMinorVersion(byte x)
Specified by:
setAbstractMinorVersion in interface webfunds.token.algorithm.AbstractTokenInterface

setImplementationMajorVersion

public final void setImplementationMajorVersion(byte x)
Specified by:
setImplementationMajorVersion in interface webfunds.token.algorithm.AbstractTokenInterface

setImplementationMinorVersion

public final void setImplementationMinorVersion(byte x)
Specified by:
setImplementationMinorVersion in interface webfunds.token.algorithm.AbstractTokenInterface

setCurrencyID

public final void setCurrencyID(byte[] x)
Specified by:
setCurrencyID in interface webfunds.token.algorithm.AbstractTokenInterface

setSeries

public final void setSeries(byte[] x)
Specified by:
setSeries in interface webfunds.token.algorithm.AbstractTokenInterface

setValue

public final void setValue(long x)
Specified by:
setValue in interface webfunds.token.algorithm.AbstractTokenInterface