|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.xml.security.SigningUtil
public final class SigningUtil
A utility class for computing and verifying raw signatures and MAC values.
| Method Summary | |
|---|---|
static byte[] |
sign(Credential signingCredential,
java.lang.String jcaAlgorithmID,
boolean isMAC,
byte[] input)
Compute the signature or MAC value over the supplied input. |
static byte[] |
sign(java.security.PrivateKey signingKey,
java.lang.String jcaAlgorithmID,
byte[] input)
Compute the raw signature value over the supplied input. |
static byte[] |
signMAC(java.security.Key signingKey,
java.lang.String jcaAlgorithmID,
byte[] input)
Compute the Message Authentication Code (MAC) value over the supplied input. |
static byte[] |
signWithURI(Credential signingCredential,
java.lang.String algorithmURI,
byte[] input)
Compute the signature or MAC value over the supplied input. |
static boolean |
verify(Credential verificationCredential,
java.lang.String jcaAlgorithmID,
boolean isMAC,
byte[] signature,
byte[] input)
Verify the signature value computed over the supplied input against the supplied signature value. |
static boolean |
verify(java.security.PublicKey verificationKey,
java.lang.String jcaAlgorithmID,
byte[] signature,
byte[] input)
Verify the signature value computed over the supplied input against the supplied signature value. |
static boolean |
verifyMAC(java.security.Key verificationKey,
java.lang.String jcaAlgorithmID,
byte[] signature,
byte[] input)
Verify the Message Authentication Code (MAC) value computed over the supplied input against the supplied MAC value. |
static boolean |
verifyWithURI(Credential verificationCredential,
java.lang.String algorithmURI,
byte[] signature,
byte[] input)
Verify the signature value computed over the supplied input against the supplied signature value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static byte[] signWithURI(Credential signingCredential,
java.lang.String algorithmURI,
byte[] input)
throws SecurityException
signingCredential - the credential containing the signing keyalgorithmURI - the algorithm URI to useinput - the input over which to compute the signature
SecurityException - throw if the computation process results in an error
public static byte[] sign(Credential signingCredential,
java.lang.String jcaAlgorithmID,
boolean isMAC,
byte[] input)
throws SecurityException
signingCredential - the credential containing the signing keyjcaAlgorithmID - the Java JCA algorithm ID to useisMAC - flag indicating whether the operation to be performed is a signature or MAC computationinput - the input over which to compute the signature
SecurityException - throw if the computation process results in an error
public static byte[] sign(java.security.PrivateKey signingKey,
java.lang.String jcaAlgorithmID,
byte[] input)
throws SecurityException
signingKey - the private key with which to compute the signaturejcaAlgorithmID - the Java JCA algorithm ID to useinput - the input over which to compute the signature
SecurityException - thrown if the signature computation results in an error
public static byte[] signMAC(java.security.Key signingKey,
java.lang.String jcaAlgorithmID,
byte[] input)
throws SecurityException
signingKey - the key with which to compute the MACjcaAlgorithmID - the Java JCA algorithm ID to useinput - the input over which to compute the MAC
SecurityException - thrown if the MAC computation results in an error
public static boolean verifyWithURI(Credential verificationCredential,
java.lang.String algorithmURI,
byte[] signature,
byte[] input)
throws SecurityException
verificationCredential - the credential containing the verification keyalgorithmURI - the algorithm URI to usesignature - the computed signature value received from the signerinput - the input over which the signature is computed and verified
SecurityException - thrown if the signature computation or verification process results in an error
public static boolean verify(Credential verificationCredential,
java.lang.String jcaAlgorithmID,
boolean isMAC,
byte[] signature,
byte[] input)
throws SecurityException
verificationCredential - the credential containing the verification keyjcaAlgorithmID - the Java JCA algorithm ID to useisMAC - flag indicating whether the operation to be performed is a signature or MAC computationsignature - the computed signature value received from the signerinput - the input over which the signature is computed and verified
SecurityException - thrown if the signature computation or verification process results in an error
public static boolean verify(java.security.PublicKey verificationKey,
java.lang.String jcaAlgorithmID,
byte[] signature,
byte[] input)
throws SecurityException
verificationKey - the key with which to compute and verify the signaturejcaAlgorithmID - the Java JCA algorithm ID to usesignature - the computed signature value received from the signerinput - the input over which the signature is computed and verified
SecurityException - thrown if the signature computation or verification process results in an error
public static boolean verifyMAC(java.security.Key verificationKey,
java.lang.String jcaAlgorithmID,
byte[] signature,
byte[] input)
throws SecurityException
verificationKey - the key with which to compute and verify the MACjcaAlgorithmID - the Java JCA algorithm ID to usesignature - the computed MAC value received from the signerinput - the input over which the MAC is computed and verified
SecurityException - thrown if the MAC computation or verification process results in an error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||