public class XMLSigningUtilTest
extends org.opensaml.core.OpenSAMLInitBaseTestCase
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
controlSignatureHMAC |
private byte[] |
controlSignatureRSA |
private org.opensaml.security.credential.Credential |
credAES |
private org.opensaml.security.credential.Credential |
credRSA |
private String |
data |
private String |
hmacAlgorithmURI |
private String |
hmacJCAAlgorithm |
private KeyPair |
keyPairRSA |
private String |
rsaAlgorithmURI |
private String |
rsaJCAAlgorithm |
private SecretKey |
secretKeyAES128 |
| Constructor and Description |
|---|
XMLSigningUtilTest() |
| Modifier and Type | Method and Description |
|---|---|
private byte[] |
getControlSignature(byte[] data,
PrivateKey privateKey,
String algorithm) |
private byte[] |
getControlSignature(byte[] data,
SecretKey secretKey,
String algorithm) |
protected void |
setUp() |
void |
testSigningWithHMAC() |
void |
testSigningWithPrivateKey() |
void |
testVerificationWithHMAC() |
void |
testVerificationWithPublicKey() |
private SecretKey secretKeyAES128
private KeyPair keyPairRSA
private org.opensaml.security.credential.Credential credAES
private org.opensaml.security.credential.Credential credRSA
private String data
private byte[] controlSignatureRSA
private byte[] controlSignatureHMAC
private String rsaAlgorithmURI
private String rsaJCAAlgorithm
private String hmacAlgorithmURI
private String hmacJCAAlgorithm
public XMLSigningUtilTest()
throws NoSuchAlgorithmException,
NoSuchProviderException
public void testSigningWithPrivateKey()
throws SecurityException
SecurityExceptionpublic void testSigningWithHMAC()
throws SecurityException
SecurityExceptionpublic void testVerificationWithPublicKey()
throws SecurityException,
NoSuchAlgorithmException,
NoSuchProviderException
public void testVerificationWithHMAC()
throws SecurityException,
NoSuchAlgorithmException,
NoSuchProviderException
private byte[] getControlSignature(byte[] data,
SecretKey secretKey,
String algorithm)
throws NoSuchAlgorithmException,
InvalidKeyException
private byte[] getControlSignature(byte[] data,
PrivateKey privateKey,
String algorithm)
throws NoSuchAlgorithmException,
InvalidKeyException,
SignatureException
Copyright © 1999–2014. All rights reserved.