Package org.xrpl.xrpl4j.keypairs
Interface EcDsaSignature
- All Known Implementing Classes:
ImmutableEcDsaSignature
@Immutable
public interface EcDsaSignature
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
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
Make sure signature is canonical to protect against signature morphing attacks.r()
The r component of thisEcDsaSignature
.s()
The s component of thisEcDsaSignature
.
-
Method Details
-
builder
-
fromDer
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
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
-