Package org.xrpl.xrpl4j.keypairs
Interface EcDsaSignature
-
- All Known Implementing Classes:
ImmutableEcDsaSignature
@Immutable public interface EcDsaSignature
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ImmutableEcDsaSignature.Builder
builder()
default UnsignedByteArray
der()
Encode thisEcDsaSignature
to the ASN.1 DER format.static EcDsaSignature
fromDer(byte[] bytes)
Create anEcDsaSignature
from a DER encoded byte array signature.default void
isStrictlyCanonical()
Make sure signature is canonical to protect against signature morphing attacks.BigInteger
r()
The r component of thisEcDsaSignature
.BigInteger
s()
The s component of thisEcDsaSignature
.
-
-
-
Method Detail
-
builder
static ImmutableEcDsaSignature.Builder builder()
-
fromDer
static EcDsaSignature fromDer(byte[] bytes)
Create anEcDsaSignature
from a DER encoded byte array signature.- Parameters:
bytes
- A DER encoded byte array containing a signature.- Returns:
- An
EcDsaSignature
.
-
r
BigInteger r()
The r component of thisEcDsaSignature
.- Returns:
- A
BigInteger
denoting the r component of this signature.
-
s
BigInteger s()
The s component of thisEcDsaSignature
.- Returns:
- A
BigInteger
denoting the r component of this signature.
-
der
@Derived default UnsignedByteArray der()
Encode thisEcDsaSignature
to the ASN.1 DER format.- Returns:
- An
UnsignedByteArray
containing the bytes of the encoded signature.
-
isStrictlyCanonical
@Check default void isStrictlyCanonical()
Make sure signature is canonical to protect against signature morphing attacks.Signature should be:
<30> <len> [ <02> <lenR> <R> ] [ <02> <lenS> <S> ]
where6 <= len <= 70
1 <= lenR <= 33
1 <= lenS <= 33
-
-