public class DSAPublicKey extends CryptoKey implements StorableBlock
Modifier and Type | Field and Description |
---|---|
static int |
HASH_LENGTH |
static int |
PADDED_SIZE |
Modifier | Constructor and Description |
---|---|
protected |
DSAPublicKey() |
|
DSAPublicKey(byte[] pubkeyBytes) |
|
DSAPublicKey(DSAGroup g,
java.math.BigInteger y) |
|
DSAPublicKey(DSAGroup g,
DSAPrivateKey p) |
|
DSAPublicKey(DSAGroup g,
java.lang.String yAsHexString)
Use this constructor if you have a Hex:ed version of y already
available, will save some conversions and string allocations.
|
|
DSAPublicKey(java.io.InputStream is) |
Modifier and Type | Method and Description |
---|---|
byte[] |
asBytes() |
byte[] |
asBytesHash() |
SimpleFieldSet |
asFieldSet() |
byte[] |
asPaddedBytes() |
DSAPublicKey |
cloneKey() |
int |
compareTo(java.lang.Object other) |
static DSAPublicKey |
create(byte[] pubkeyAsBytes) |
static DSAPublicKey |
create(SimpleFieldSet set,
DSAGroup group) |
boolean |
equals(DSAPublicKey o) |
boolean |
equals(java.lang.Object o) |
byte[] |
fingerprint() |
byte[] |
getFullKey() |
java.math.BigInteger |
getG() |
DSAGroup |
getGroup() |
java.math.BigInteger |
getP() |
java.math.BigInteger |
getQ() |
byte[] |
getRoutingKey() |
java.math.BigInteger |
getY() |
int |
hashCode() |
int |
keyId() |
java.lang.String |
keyType() |
static CryptoKey |
read(java.io.InputStream i) |
java.lang.String |
toLongString() |
fingerprint, fingerprintToString, main, toString, verboseToString
public static final int PADDED_SIZE
public static final int HASH_LENGTH
public DSAPublicKey(DSAGroup g, java.math.BigInteger y)
public DSAPublicKey(DSAGroup g, java.lang.String yAsHexString) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public DSAPublicKey(DSAGroup g, DSAPrivateKey p)
public DSAPublicKey(java.io.InputStream is) throws java.io.IOException, CryptFormatException
java.io.IOException
CryptFormatException
public DSAPublicKey(byte[] pubkeyBytes) throws java.io.IOException, CryptFormatException
java.io.IOException
CryptFormatException
protected DSAPublicKey()
public static DSAPublicKey create(byte[] pubkeyAsBytes) throws CryptFormatException
CryptFormatException
public java.math.BigInteger getY()
public java.math.BigInteger getP()
public java.math.BigInteger getQ()
public java.math.BigInteger getG()
public final DSAGroup getGroup()
public static CryptoKey read(java.io.InputStream i) throws java.io.IOException, CryptFormatException
java.io.IOException
CryptFormatException
public int keyId()
public java.lang.String toLongString()
toLongString
in interface CryptoElement
public byte[] asBytesHash()
public byte[] asPaddedBytes()
public byte[] fingerprint()
fingerprint
in class CryptoKey
public boolean equals(DSAPublicKey o)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(java.lang.Object other)
public SimpleFieldSet asFieldSet()
public static DSAPublicKey create(SimpleFieldSet set, DSAGroup group) throws FSParseException
FSParseException
public byte[] getFullKey()
getFullKey
in interface StorableBlock
public byte[] getRoutingKey()
getRoutingKey
in interface StorableBlock
public DSAPublicKey cloneKey()