Serializable, DataStructurepublic class VerifiedDestination extends Destination
| Modifier and Type | Field | Description |
|---|---|---|
static int |
CERTIFICATE_LENGTH_SIGNED |
Defaults for Signed Certs
|
static int |
CERTIFICATE_LENGTH_SIGNED_WITH_HASH |
|
static int |
MIN_HASHCASH_EFFORT |
Defaults for HashCash Certs
|
_certificate, _padding, _publicKey, _signingKey| Constructor | Description |
|---|---|
VerifiedDestination() |
|
VerifiedDestination(String s) |
alternative constructor which takes a base64 string representation
|
VerifiedDestination(Destination d) |
create from an existing Dest
|
| Modifier and Type | Method | Description |
|---|---|---|
String |
toString() |
|
boolean |
verifyCert(boolean allowNone) |
verify the certificate.
|
protected boolean |
verifyHashCashCert() |
HashCash Certs are used to demonstrate proof-of-work.
|
protected boolean |
verifySignedCert() |
Signed Certs are signed by a 3rd-party Destination.
|
protected boolean |
verifyUnknownCert() |
Reject all unknown certs
|
fromBase64, fromByteArray, read, toByteArrayclearCache, create, equals, hashCode, readBytes, size, toBase32, toBase64, writeBytescalculateHash, getCertificate, getHash, getPadding, getPublicKey, getSigningPublicKey, getSigType, readBytes, setCertificate, setPadding, setPublicKey, setSigningPublicKey, writeBytespublic static final int MIN_HASHCASH_EFFORT
public static final int CERTIFICATE_LENGTH_SIGNED
public static final int CERTIFICATE_LENGTH_SIGNED_WITH_HASH
public VerifiedDestination()
public VerifiedDestination(String s) throws DataFormatException
s - a Base64 representation of the destination, as (eg) is used in hosts.txtDataFormatExceptionpublic VerifiedDestination(Destination d) throws DataFormatException
d - must be non-nullDataFormatExceptionpublic boolean verifyCert(boolean allowNone)
allowNone - If true, allow a NULL or HIDDEN certificate.protected boolean verifyHashCashCert()
protected boolean verifySignedCert()
protected boolean verifyUnknownCert()
public String toString()
toString in class KeysAndCert