public final class CryptoKeys extends Object
| Constructor and Description |
|---|
CryptoKeys(Map<String,byte[]> trustedKeys) |
| Modifier and Type | Method and Description |
|---|---|
static String |
decodeAES(String base64CipherTxt,
String pwd) |
static String |
decodeAES(String base64CipherTxt,
String pwd,
int keySizeBits) |
static PublicKey |
getX509PublicKey(byte[] buf)
Create PublicKey from a .DER file
|
static boolean |
verify(PublicKey publicKey,
byte[] sig,
ByteBuffer data)
Verify the signature of a file
|
String |
verify(String sig,
ByteBuffer data)
Try with all signatures and return the name of the signature that matched
|
public String verify(String sig, ByteBuffer data)
public static PublicKey getX509PublicKey(byte[] buf) throws Exception
Exceptionpublic static boolean verify(PublicKey publicKey, byte[] sig, ByteBuffer data) throws InvalidKeyException, SignatureException
publicKey - the public key used to sign thissig - the signaturedata - The data tha is signedInvalidKeyExceptionSignatureExceptionCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.