public static class ECKey.ECDSASignature
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.math.BigInteger |
r
The two components of the signature.
|
java.math.BigInteger |
s
The two components of the signature.
|
Constructor and Description |
---|
ECDSASignature(java.math.BigInteger r,
java.math.BigInteger s)
Constructs a signature with the given components.
|
Modifier and Type | Method and Description |
---|---|
static ECKey.ECDSASignature |
decodeFromDER(byte[] bytes) |
protected java.io.ByteArrayOutputStream |
derByteStream() |
byte[] |
encodeToDER()
DER is an international standard for serializing data structures which is widely used in cryptography.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isCanonical()
Returns true if the S component is "low", that means it is below
ECKey.HALF_CURVE_ORDER . |
ECKey.ECDSASignature |
toCanonicalised()
Will automatically adjust the S component to be less than or equal to half the curve order, if necessary.
|
public final java.math.BigInteger r
public final java.math.BigInteger s
public ECDSASignature(java.math.BigInteger r, java.math.BigInteger s)
public boolean isCanonical()
ECKey.HALF_CURVE_ORDER
. See BIP62.public ECKey.ECDSASignature toCanonicalised()
public byte[] encodeToDER()
public static ECKey.ECDSASignature decodeFromDER(byte[] bytes) throws SignatureDecodeException
SignatureDecodeException
- if the signature is unparseable in some way.protected java.io.ByteArrayOutputStream derByteStream() throws java.io.IOException
java.io.IOException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object