org.opensaml.xml.security
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() |
assertEquals, 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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, tearDown, toString
private 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.TestCase
Exception
public void testSigningWithPrivateKey() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testSigningWithHMAC() throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
public void testVerificationWithPublicKey() throws org.opensaml.xml.security.SecurityException, NoSuchAlgorithmException, NoSuchProviderException
org.opensaml.xml.security.SecurityException
NoSuchAlgorithmException
NoSuchProviderException
public void testVerificationWithHMAC() throws org.opensaml.xml.security.SecurityException, NoSuchAlgorithmException, NoSuchProviderException
org.opensaml.xml.security.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 JBoss by Red Hat. All Rights Reserved.