Package net.i2p.data
Class BlindData
- java.lang.Object
-
- net.i2p.data.BlindData
-
public class BlindData extends Object
Cache data for Blinding EdDSA keys. PRELIMINARY - Subject to change - see proposal 123- Since:
- 0.9.40
-
-
Constructor Summary
Constructors Constructor Description BlindData(I2PAppContext ctx, Destination dest, SigType blindType, String secret)
BlindData(I2PAppContext ctx, Destination dest, SigType blindType, String secret, int authType, PrivateKey authKey)
BlindData(I2PAppContext ctx, SigningPublicKey spk, SigType blindType, String secret)
BlindData(I2PAppContext ctx, SigningPublicKey spk, SigType blindType, String secret, int authType, PrivateKey authKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SigningPrivateKey
getAlpha()
PrivateKey
getAuthPrivKey()
boolean
getAuthRequired()
int
getAuthType()
Hash
getBlindedHash()
SigningPublicKey
getBlindedPubKey()
SigType
getBlindedSigType()
long
getDate()
Creation date.Hash
getDestHash()
Destination
getDestination()
long
getExpiration()
Expiration date.String
getSecret()
boolean
getSecretRequired()
SigningPublicKey
getUnblindedPubKey()
void
setAuthRequired()
void
setDate(long date)
Creation date.void
setDestination(Destination d)
void
setExpiration(long date)
Expiration date.void
setSecretRequired()
String
toBase32()
b33 formatString
toString()
-
-
-
Field Detail
-
AUTH_NONE
public static final int AUTH_NONE
bits 3-0 including per-client bit- Since:
- 0.9.41
- See Also:
- Constant Field Values
-
AUTH_DH
public static final int AUTH_DH
bits 3-0 including per-client bit- Since:
- 0.9.41
- See Also:
- Constant Field Values
-
AUTH_PSK
public static final int AUTH_PSK
bits 3-0 including per-client bit- Since:
- 0.9.41
- See Also:
- Constant Field Values
-
AUTH_ON
public static final int AUTH_ON
Enabled, unspecified type- Since:
- 0.9.41
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BlindData
public BlindData(I2PAppContext ctx, Destination dest, SigType blindType, String secret)
- Parameters:
secret
- may be null or zero-length- Throws:
IllegalArgumentException
- on various errors
-
BlindData
public BlindData(I2PAppContext ctx, Destination dest, SigType blindType, String secret, int authType, PrivateKey authKey)
- Parameters:
secret
- may be null or zero-length- Throws:
IllegalArgumentException
- on various errors- Since:
- 0.9.41
-
BlindData
public BlindData(I2PAppContext ctx, SigningPublicKey spk, SigType blindType, String secret)
- Parameters:
secret
- may be null or zero-length- Throws:
IllegalArgumentException
- on various errors
-
BlindData
public BlindData(I2PAppContext ctx, SigningPublicKey spk, SigType blindType, String secret, int authType, PrivateKey authKey)
- Parameters:
secret
- may be null or zero-length- Throws:
IllegalArgumentException
- on various errors- Since:
- 0.9.41
-
-
Method Detail
-
getUnblindedPubKey
public SigningPublicKey getUnblindedPubKey()
- Returns:
- The unblinded SPK, non-null
-
getBlindedSigType
public SigType getBlindedSigType()
- Returns:
- The type of the blinded key
-
getBlindedPubKey
public SigningPublicKey getBlindedPubKey()
- Returns:
- The blinded key for the current day, non-null
-
getDestHash
public Hash getDestHash()
- Returns:
- The hash of the destination if known, or null
-
getBlindedHash
public Hash getBlindedHash()
- Returns:
- The hash of the blinded key for the current day
-
getAlpha
public SigningPrivateKey getAlpha()
- Returns:
- Alpha for the current day
-
getDestination
public Destination getDestination()
- Returns:
- null if unknown
-
setDestination
public void setDestination(Destination d)
- Throws:
IllegalArgumentException
- on SigningPublicKey mismatch
-
getSecret
public String getSecret()
- Returns:
- null if none
-
getAuthType
public int getAuthType()
- Returns:
- 0 for no client auth, 1 for DH, 3 for PSK
-
getAuthPrivKey
public PrivateKey getAuthPrivKey()
- Returns:
- null for no client auth
-
toBase32
public String toBase32()
b33 format- Since:
- 0.9.41
-
setSecretRequired
public void setSecretRequired()
- Since:
- 0.9.41
-
getSecretRequired
public boolean getSecretRequired()
- Since:
- 0.9.41
-
setAuthRequired
public void setAuthRequired()
- Since:
- 0.9.41
-
getAuthRequired
public boolean getAuthRequired()
- Since:
- 0.9.41
-
setDate
public void setDate(long date)
Creation date. Absolute timestamp.- Since:
- 0.9.41
-
getDate
public long getDate()
Creation date. Absolute timestamp. Returns zero if not specified.- Returns:
- creation date or as overridden by setDate()
- Since:
- 0.9.41
-
setExpiration
public void setExpiration(long date)
Expiration date. Absolute timestamp.- Since:
- 0.9.43
-
getExpiration
public long getExpiration()
Expiration date. Absolute timestamp. Returns zero if not specified.- Returns:
- expiration date or as overridden by setExpiration()
- Since:
- 0.9.43
-
-