public class SignatureUtil extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
doSignature(String data)
Performs the signature with the default private key in the system.
|
static byte[] |
getThumbPrintForAlias(String alias)
Retrieves the thumbprint for alias.
|
static void |
init() |
static boolean |
validateSignature(byte[] thumb,
String data,
byte[] signature)
Validates the signature with the given thumbprint
|
static boolean |
validateSignature(String data,
byte[] signature)
Validate the signature with the default thumbprint.
|
public static byte[] getThumbPrintForAlias(String alias) throws Exception
alias
- The aliasException
public static boolean validateSignature(byte[] thumb, String data, byte[] signature) throws Exception
thumb
- Thumbprint of the certificatedata
- Data on which the signature is performedsignature
- The signature.Exception
public static boolean validateSignature(String data, byte[] signature) throws Exception
data
- The data which is used to perfrom the signature.signature
- The signature to be validated.Exception
Copyright © 2016 WSO2 Inc. All rights reserved.