public final class SignatureEncoding extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
fromAsn1Der(byte[] asn1DerSignature,
Ecdsa algorithm)
Converts an ASN.1 DER encoded ECDSA signature to a raw signature in the form R|S
|
static byte[] |
fromAsn1Der(byte[] asn1DerSignature,
String algorithm)
Converts an ASN.1 DER encoded ECDSA signature to a raw signature in the form R|S
|
static byte[] |
toAsn1Der(byte[] signature,
Ecdsa algorithm)
Converts a raw ECDSA signature in the form R|S to an ASN.1 DER encoded signature.
|
static byte[] |
toAsn1Der(byte[] signature,
String algorithm)
Converts a raw ECDSA signature in the form R|S to an ASN.1 DER encoded signature.
|
public static byte[] fromAsn1Der(byte[] asn1DerSignature,
String algorithm)
throws NoSuchAlgorithmException
asn1DerSignature - An ASN.1 DER encoded signaturealgorithm - The algorithm used to produce the given ASN.1 DER encoded signatureNoSuchAlgorithmExceptionpublic static byte[] fromAsn1Der(byte[] asn1DerSignature,
Ecdsa algorithm)
asn1DerSignature - An ASN.1 DER encoded signaturealgorithm - The algorithm used to produce the given ASN.1 DER encoded signaturepublic static byte[] toAsn1Der(byte[] signature,
String algorithm)
throws NoSuchAlgorithmException
signature - A raw ECDSA signature in the form R|S.algorithm - The algorithm used to produce the given signature.NoSuchAlgorithmExceptionpublic static byte[] toAsn1Der(byte[] signature,
Ecdsa algorithm)
signature - A raw ECDSA signature in the form R|S.algorithm - The algorithm used to produce the given signature./**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/