public class ECDSASignature extends Object
The DER encoded ECDSA signature structure is as follows:
s byte array | Length of s byte array | | | Integer Tag | | Sequence Tag | | | | | | | DER Encoded ECDSA Signature: | 0x30 | lenZ | 0x02 | len(r) | r | 0x02 | len(s) | s | | | | Length of the remaining byte array | | | | | | Integer Tag | | | | Length of r byte array | |
Constructor and Description |
---|
ECDSASignature(byte[] bytes) |
Modifier and Type | Method and Description |
---|---|
byte[] |
derDecode(Algorithm algorithm)
Accept a DER encoded signature and extract the 'r' and the 's' components of the Elliptic signature.
|
byte[] |
derEncode()
Accept an ECDSA encoded signature of the 'r' and 's' elliptic components, return these values DER encoded.
|
public byte[] derDecode(Algorithm algorithm) throws IOException
algorithm
- the signature algorithm usedIOException
- when $%@! gets real.public byte[] derEncode() throws IOException
IOException
- when $%@! gets real.Copyright © 2021. All rights reserved.