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, verboseToStringpublic 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.NumberFormatExceptionpublic DSAPublicKey(DSAGroup g, DSAPrivateKey p)
public DSAPublicKey(java.io.InputStream is)
throws java.io.IOException,
CryptFormatException
java.io.IOExceptionCryptFormatExceptionpublic DSAPublicKey(byte[] pubkeyBytes)
throws java.io.IOException,
CryptFormatException
java.io.IOExceptionCryptFormatExceptionprotected DSAPublicKey()
public static DSAPublicKey create(byte[] pubkeyAsBytes) throws CryptFormatException
CryptFormatExceptionpublic 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.IOExceptionCryptFormatExceptionpublic int keyId()
public java.lang.String toLongString()
toLongString in interface CryptoElementpublic byte[] asBytesHash()
public byte[] asPaddedBytes()
public byte[] fingerprint()
fingerprint in class CryptoKeypublic boolean equals(DSAPublicKey o)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int compareTo(java.lang.Object other)
public SimpleFieldSet asFieldSet()
public static DSAPublicKey create(SimpleFieldSet set, DSAGroup group) throws FSParseException
FSParseExceptionpublic byte[] getFullKey()
getFullKey in interface StorableBlockpublic byte[] getRoutingKey()
getRoutingKey in interface StorableBlockpublic DSAPublicKey cloneKey()