Class SignatureEncoding
- java.lang.Object
-
- com.microsoft.azure.keyvault.cryptography.SignatureEncoding
-
public final class SignatureEncoding extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
fromAsn1Der(byte[] asn1DerSignature, Ecdsa algorithm)
Converts an ASN.1 DER encoded ECDSA signature to a raw signature in the form R|Sstatic byte[]
fromAsn1Der(byte[] asn1DerSignature, String algorithm)
Converts an ASN.1 DER encoded ECDSA signature to a raw signature in the form R|Sstatic 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.
-
-
-
Method Detail
-
fromAsn1Der
public static byte[] fromAsn1Der(byte[] asn1DerSignature, String algorithm) throws NoSuchAlgorithmException
Converts an ASN.1 DER encoded ECDSA signature to a raw signature in the form R|S- Parameters:
asn1DerSignature
- An ASN.1 DER encoded signaturealgorithm
- The algorithm used to produce the given ASN.1 DER encoded signature- Returns:
- The raw format of the given ASN.1 DER encoded signature in the form R|S
- Throws:
NoSuchAlgorithmException
-
fromAsn1Der
public static byte[] fromAsn1Der(byte[] asn1DerSignature, Ecdsa algorithm)
Converts an ASN.1 DER encoded ECDSA signature to a raw signature in the form R|S- Parameters:
asn1DerSignature
- An ASN.1 DER encoded signaturealgorithm
- The algorithm used to produce the given ASN.1 DER encoded signature- Returns:
- The raw format of the given ASN.1 DER encoded signature in the form R|S
-
toAsn1Der
public static byte[] toAsn1Der(byte[] signature, String algorithm) throws NoSuchAlgorithmException
Converts a raw ECDSA signature in the form R|S to an ASN.1 DER encoded signature.- Parameters:
signature
- A raw ECDSA signature in the form R|S.algorithm
- The algorithm used to produce the given signature.- Returns:
- The ASN.1 DER encoded signature of the given signature.
- Throws:
NoSuchAlgorithmException
-
toAsn1Der
public static byte[] toAsn1Der(byte[] signature, Ecdsa algorithm)
Converts a raw ECDSA signature in the form R|S to an ASN.1 DER encoded signature.- Parameters:
signature
- A raw ECDSA signature in the form R|S.algorithm
- The algorithm used to produce the given signature.- Returns:
- The ASN.1 DER encoded signature of the given signature.
-
-