Package org.opensaml.security.crypto
Class SigningUtilTest
java.lang.Object
org.opensaml.security.crypto.SigningUtilTest
Test the SigningUtil operations for generating and verifying simple, raw signatures and MAC's.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private byte[]private Credentialprivate Credentialprivate Stringprivate Stringprivate KeyPairprivate Stringprivate SecretKey -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]getControlSignature(byte[] data1, PrivateKey privateKey, String algorithm) private byte[]getControlSignature(byte[] data1, SecretKey secretKey, String algorithm) protected voidsetUp()voidvoidvoidvoid
-
Field Details
-
secretKeyAES128
-
keyPairRSA
-
credAES
-
credRSA
-
data
-
controlSignatureRSA
private byte[] controlSignatureRSA -
controlSignatureHMAC
private byte[] controlSignatureHMAC -
rsaJCAAlgorithm
-
hmacJCAAlgorithm
-
-
Constructor Details
-
SigningUtilTest
-
-
Method Details
-
setUp
- Throws:
Exception
-
testSigningWithPrivateKey
- Throws:
SecurityException
-
testSigningWithHMAC
- Throws:
SecurityException
-
testVerificationWithPublicKey
public void testVerificationWithPublicKey() throws SecurityException, NoSuchAlgorithmException, NoSuchProviderException -
testVerificationWithHMAC
public void testVerificationWithHMAC() throws SecurityException, NoSuchAlgorithmException, NoSuchProviderException -
getControlSignature
private byte[] getControlSignature(byte[] data1, SecretKey secretKey, String algorithm) throws NoSuchAlgorithmException, InvalidKeyException -
getControlSignature
private byte[] getControlSignature(byte[] data1, PrivateKey privateKey, String algorithm) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException
-