Class EcdsaSignature
An ECDSA signature and its DER encoding.
Inheritance
object
EcdsaSignature
Assembly: Xrpl.Keypairs.dll
Syntax
public class EcdsaSignature
Constructors
|
Edit this page
View Source
EcdsaSignature(BigInteger, BigInteger)
Constructs a signature with the given components.
Declaration
public EcdsaSignature(BigInteger r, BigInteger s)
Parameters
| Type |
Name |
Description |
| BigInteger |
r |
|
| BigInteger |
s |
|
Exceptions
| Type |
Condition |
| ArgumentOutOfRangeException |
r or s is negative.
|
Fields
|
Edit this page
View Source
R
The two components of the signature, non-negative.
Declaration
Field Value
| Type |
Description |
| BigInteger |
|
|
Edit this page
View Source
S
The two components of the signature, non-negative.
Declaration
Field Value
| Type |
Description |
| BigInteger |
|
Methods
|
Edit this page
View Source
CheckIsCanonical(byte[], bool)
Whether sig is a canonical DER signature: minimal positive R and S
below the curve order, and with strict also S at most n/2.
Declaration
public static bool CheckIsCanonical(byte[] sig, bool strict)
Parameters
| Type |
Name |
Description |
| byte[] |
sig |
|
| bool |
strict |
|
Returns
|
Edit this page
View Source
DecodeFromDer(byte[])
Decodes a DER signature; returns null when the bytes are not exactly one DER SEQUENCE of
two INTEGERs in minimal encoding.
Declaration
public static EcdsaSignature DecodeFromDer(byte[] bytes)
Parameters
| Type |
Name |
Description |
| byte[] |
bytes |
|
Returns
|
Edit this page
View Source
EncodeToDer()
The DER encoding of the signature: a SEQUENCE of two minimal INTEGERs, as OpenSSL and
rippled read it.
Declaration
public byte[] EncodeToDer()
Returns
|
Edit this page
View Source
IsStrictlyCanonical(byte[])
Whether sig is a canonical DER signature with a low S, as rippled
requires under tfFullyCanonicalSig.
Declaration
public static bool IsStrictlyCanonical(byte[] sig)
Parameters
| Type |
Name |
Description |
| byte[] |
sig |
|
Returns