public class SigningUtilTest
extends junit.framework.TestCase
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
controlSignatureHMAC |
private byte[] |
controlSignatureRSA |
private org.opensaml.xml.security.credential.Credential |
credAES |
private org.opensaml.xml.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 |
|---|
SigningUtilTest() |
| 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() |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toStringassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSameprivate SecretKey secretKeyAES128
private KeyPair keyPairRSA
private org.opensaml.xml.security.credential.Credential credAES
private org.opensaml.xml.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 SigningUtilTest()
throws NoSuchAlgorithmException,
NoSuchProviderException
protected void setUp()
throws Exception
setUp in class junit.framework.TestCaseExceptionpublic void testSigningWithPrivateKey()
throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityExceptionpublic void testSigningWithHMAC()
throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityExceptionpublic void testVerificationWithPublicKey()
throws org.opensaml.xml.security.SecurityException,
NoSuchAlgorithmException,
NoSuchProviderException
org.opensaml.xml.security.SecurityExceptionNoSuchAlgorithmExceptionNoSuchProviderExceptionpublic void testVerificationWithHMAC()
throws org.opensaml.xml.security.SecurityException,
NoSuchAlgorithmException,
NoSuchProviderException
org.opensaml.xml.security.SecurityExceptionNoSuchAlgorithmExceptionNoSuchProviderExceptionprivate 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.