Package org.opensaml.xmlsec.crypto.tests
Class XMLSigningUtilTest
java.lang.Object
org.opensaml.core.testing.OpenSAMLInitBaseTestCase
org.opensaml.xmlsec.crypto.tests.XMLSigningUtilTest
public class XMLSigningUtilTest
extends org.opensaml.core.testing.OpenSAMLInitBaseTestCase
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 Stringprivate KeyPairprivate Stringprivate 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()voidvoidvoidvoidMethods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
Field Details
-
secretKeyAES128
-
keyPairRSA
-
credAES
-
credRSA
-
data
-
controlSignatureRSA
private byte[] controlSignatureRSA -
controlSignatureHMAC
private byte[] controlSignatureHMAC -
rsaAlgorithmURI
-
rsaJCAAlgorithm
-
hmacAlgorithmURI
-
hmacJCAAlgorithm
-
-
Constructor Details
-
XMLSigningUtilTest
-
-
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
-