webfunds.token.algorithm
Class AbstractBlindedToken

java.lang.Object
  |
  +--webfunds.token.algorithm.AbstractBlindedToken
Direct Known Subclasses:
ChaumBlindedToken, RandomBlindedToken

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

Class description


Constructor Summary
AbstractBlindedToken()
           
 
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[] getClientChallenge(java.security.SecureRandom sr, AbstractPrivateTokenParameters privparams)
           
 byte[] getCurrencyID()
           
 byte getImplementationMajorVersion()
           
 byte getImplementationMinorVersion()
           
 byte[] getSeries()
           
 byte[] getServerResponse(byte[] challenge, java.security.SecureRandom sr, AbstractPrivateTokenParameters privparams)
           
 long getValue()
           
 boolean needsClientChallenge()
           
 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)
           
abstract  void sign(java.security.SecureRandom sr, AbstractPrivateTokenParameters privparams)
           
 boolean verifyClientResponse(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

AbstractBlindedToken

public AbstractBlindedToken()
Method Detail

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

sign

public abstract void sign(java.security.SecureRandom sr,
                          AbstractPrivateTokenParameters privparams)

encodeImpl

protected abstract byte[] encodeImpl()

encode

public final byte[] encode()

needsClientChallenge

public boolean needsClientChallenge()

getClientChallenge

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

verifyClientResponse

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

getServerResponse

public byte[] getServerResponse(byte[] challenge,
                                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