Package com.landawn.abacus.util
Class WSSecurityUtil
java.lang.Object
com.landawn.abacus.util.WSSecurityUtil
Note: it's copied from Apache WSS4J developed at The Apache Software Foundation (http://www.apache.org/), or under the Apache License 2.0. The methods copied from other products/frameworks may be modified in this class.
WS-Security Utility methods.- Author:
- Davanum Srinivas ([email protected]).
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
doPasswordDigest
(byte[] nonce, byte[] created, byte[] password) Do password digest.static String
doPasswordDigest
(String nonce, String created, String password) Do password digest.static byte[]
generateDigest
(byte[] inputBytes) Generate a (SHA1) digest of the input bytes.static byte[]
generateNonce
(int length) Generate a nonce of the given length using the SHA1PRNG algorithm.
-
Method Details
-
generateNonce
public static byte[] generateNonce(int length) Generate a nonce of the given length using the SHA1PRNG algorithm. The SecureRandom instance that backs this method is cached for efficiency.- Parameters:
length
-- Returns:
- a nonce of the given length
-
generateDigest
public static byte[] generateDigest(byte[] inputBytes) Generate a (SHA1) digest of the input bytes. The MessageDigest instance that backs this method is cached for efficiency.- Parameters:
inputBytes
- the bytes to digest- Returns:
-
doPasswordDigest
Do password digest.- Parameters:
nonce
-created
-password
-- Returns:
-
doPasswordDigest
Do password digest.- Parameters:
nonce
-created
-password
-- Returns:
-