|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensaml.artifact.Util
public final class Util
An artifact utility class.
Method Summary | |
---|---|
static byte[] |
concat(byte[] left_bytes,
byte[] right_bytes)
Concatenate two byte arrays. |
static byte[] |
generateSourceId(MessageDigest md,
String s)
Generate a sourceId from the given
string using the given MessageDigest
object. |
static byte[] |
generateSourceId(String s)
Generate a sourceId from the given
string. |
static byte[] |
generateSourceId(URI providerId)
A convenience method to generate a sourceId
from the given providerId . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static byte[] generateSourceId(MessageDigest md, String s)
Generate a sourceId
from the given
string using the given MessageDigest
object.
md
- a MessageDigest
objects
- an arbitrary string
MessageDigest
public static byte[] generateSourceId(String s) throws NoSuchAlgorithmException
Generate a sourceId
from the given
string. Instantiate a local MessageDigest
object as needed.
s
- an arbitrary string
NoSuchAlgorithmException
- if the Java implementation does not support
the "SHA-1" hash algorithm.MessageDigest
public static byte[] generateSourceId(URI providerId) throws NoSuchAlgorithmException
A convenience method to generate a sourceId
from the given providerId
. The URI is simply
converted to a string before it is hashed.
providerId
- the providerId of the artifact issuer
NoSuchAlgorithmException
- if the Java implementation does not support
the "SHA-1" hash algorithm.MessageDigest
public static byte[] concat(byte[] left_bytes, byte[] right_bytes)
left_bytes
- An array of bytes.right_bytes
- Another array of bytes.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |