public final class SignatureHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
toDER(byte[] jwsSignature)
Transcodes the ECDSA JWS signature into ASN.1/DER format for use by
the JCA verifier.
|
static byte[] |
toJWS(byte[] derSignature,
int signatureLength)
Transcodes the JCA ASN.1/DER-encoded signature into the concatenated
R + S format expected by ECDSA JWS.
|
public static byte[] toJWS(byte[] derSignature,
int signatureLength)
derSignature - The ASN1./DER-encoded. Must not be null.signatureLength - The length for the JWS signature.RuntimeException - If the ASN.1/DER signature format is invalid.public static byte[] toDER(byte[] jwsSignature)
jwsSignature - The JWS signature, consisting of the
concatenated R and S values. Must not be
null.RuntimeException - If the ECDSA JWS signature format is invalid.Copyright © 2020. All rights reserved.