|
Oracle Security Developer Tools XKMS Java API Reference 10g (10.1.4.0.1) B28176-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.xmlsec.xkms.util.XKMSUtils
A set of Utility functions.
Constructor Summary | |
XKMSUtils() |
Method Summary | |
static byte[] |
doMacAuthN(byte[] data, oracle.security.crypto.core.AlgorithmIdentifier hashAlgID) Convert the shared secret to an Authentication Key as per section 8.1 of the XKMS specification. |
static byte[] |
doMacPrivateKey(byte[] data, oracle.security.crypto.core.AlgorithmIdentifier hashAlgID, int length) Convert the shared secret to a private key data as per section 8.1 of the XKMS specification. |
static byte[] |
doMacRC(byte[] data, oracle.security.crypto.core.AlgorithmIdentifier hashAlgID) Convert the shared secret to an Authentication Key as per section 8.1 of the XKMS specification. |
static byte[] |
doMacRCI(byte[] data, oracle.security.crypto.core.AlgorithmIdentifier hashAlgID) Convert the shared secret to a RevocationCode as per section 8.1 of the XKMS specification. |
static byte[] |
generateNonce(java.util.Date time, java.math.BigInteger serialNo, byte[] secretKey, oracle.security.crypto.core.AlgorithmIdentifier hmacAlgID) Generate the Nonce as per the algorithm specified in Section 2.6.2 of the W3C XKMS specification. |
static oracle.security.xmlsec.util.XMLElement |
getInstance(org.w3c.dom.Element element) Instantiates a concrete Message subclass implementation to wrap the given Element . |
static void |
insertChild(org.w3c.dom.Element parent, org.w3c.dom.Element e, java.lang.String[] tag, java.lang.String[] ns) Inserts a child element after any occurrences of the given elements. |
static void |
insertChild(oracle.security.xmlsec.util.XMLElement parent, oracle.security.xmlsec.util.XMLElement e, java.lang.String[] tag, java.lang.String[] ns) Inserts a child element after any occurrences of the given elements. |
static void |
removeChildren(org.w3c.dom.Element parent, java.lang.String tag, java.lang.String ns) Removes any child elements with the given tag name. |
static byte[] |
secretString2Bytes(java.lang.String secret) Convert the shared secret to bytes as per section 8.1 of the XKMS specification. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XKMSUtils()
Method Detail |
public static byte[] secretString2Bytes(java.lang.String secret) throws java.io.UnsupportedEncodingException
Note: This method only supports a subset of RFC 4103 stringprep profile.
secret
- The shared secret used to derive the keying material.java.io.UnsupportedEncodingException
public static byte[] doMacAuthN(byte[] data, oracle.security.crypto.core.AlgorithmIdentifier hashAlgID) throws oracle.security.crypto.core.AlgorithmIdentifierException
data
- The input material.hashAlgID
- The MAC algorithm.oracle.security.crypto.core.AlgorithmIdentifierException
public static byte[] doMacRC(byte[] data, oracle.security.crypto.core.AlgorithmIdentifier hashAlgID) throws oracle.security.crypto.core.AlgorithmIdentifierException
data
- The input material.hashAlgID
- The MAC algorithm.oracle.security.crypto.core.AlgorithmIdentifierException
public static byte[] doMacRCI(byte[] data, oracle.security.crypto.core.AlgorithmIdentifier hashAlgID) throws oracle.security.crypto.core.AlgorithmIdentifierException
data
- The input material.hashAlgID
- The MAC algorithm.oracle.security.crypto.core.AlgorithmIdentifierException
public static byte[] doMacPrivateKey(byte[] data, oracle.security.crypto.core.AlgorithmIdentifier hashAlgID, int length) throws oracle.security.crypto.core.AlgorithmIdentifierException
data
- The input material.hashAlgID
- The MAC algorithm.length
- The number of key bytes to generate.oracle.security.crypto.core.AlgorithmIdentifierException
public static void insertChild(oracle.security.xmlsec.util.XMLElement parent, oracle.security.xmlsec.util.XMLElement e, java.lang.String[] tag, java.lang.String[] ns) throws org.w3c.dom.DOMException
parent
- The element to which a child will be appended.e
- The child element to insert.tag
- An array of element tag names after any occurrence of which the child element is to be inserted. The tags must be presented in the order in which they appear in the parent element's schema.ns
- An array of namespace URIs corresponding to the tag names in the tag
array.org.w3c.dom.DOMException
public static void insertChild(org.w3c.dom.Element parent, org.w3c.dom.Element e, java.lang.String[] tag, java.lang.String[] ns) throws org.w3c.dom.DOMException
parent
- The element to which a child will be appended.e
- The child element to insert.tag
- An array of element tag names after any occurrence of which the child element is to be inserted. The tags must be presented in the order in which they appear in the parent element's schema.ns
- An array of namespace URIs corresponding to the tag names in the tag
array.org.w3c.dom.DOMException
public static void removeChildren(org.w3c.dom.Element parent, java.lang.String tag, java.lang.String ns)
parent
- The element whose children will be removed.tag
- The tag name of the child element(s) to remove.ns
- The namespace URI of the element(s) to remove.public static byte[] generateNonce(java.util.Date time, java.math.BigInteger serialNo, byte[] secretKey, oracle.security.crypto.core.AlgorithmIdentifier hmacAlgID) throws oracle.security.crypto.core.AlgorithmIdentifierException, java.io.IOException
time
- The current time.serialNo
- A unique serial number.secretKey
- The MAC key.hmacAlgID
- The MAC algorithm identifier.java.io.IOException
oracle.security.crypto.core.AlgorithmIdentifierException
public static oracle.security.xmlsec.util.XMLElement getInstance(org.w3c.dom.Element element) throws org.w3c.dom.DOMException
Message
subclass implementation to wrap the given Element
.element
- An org.w3c.dom.Element
that conforms to an element from the xkms schema.XMLElement
, or null
if no appropriate implementation class could be found.org.w3c.dom.DOMException
|
Oracle Security Developer Tools XKMS Java API Reference 10g (10.1.4.0.1) B28176-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |