public final class UsernameTokenUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_ITERATION |
| Modifier and Type | Method and Description |
|---|---|
static String |
doPasswordDigest(byte[] nonce,
String created,
byte[] password) |
static String |
doPasswordDigest(byte[] nonce,
String created,
String password) |
static byte[] |
doRawPasswordDigest(byte[] nonce,
String created,
byte[] password) |
static byte[] |
generateDerivedKey(byte[] password,
byte[] salt,
int iteration)
This static method generates a derived key as defined in WSS Username
Token Profile.
|
static byte[] |
generateDerivedKey(String password,
byte[] salt,
int iteration)
This static method generates a derived key as defined in WSS Username
Token Profile.
|
static byte[] |
generateSalt(boolean useForMac)
This static method generates a 128 bit salt value as defined in WSS
Username Token Profile.
|
static String |
getRawPassword(CallbackHandler callbackHandler,
String username,
String password,
String passwordType)
Get the raw (plain text) password used to compute secret key.
|
public static final int DEFAULT_ITERATION
public static byte[] generateDerivedKey(byte[] password,
byte[] salt,
int iteration)
throws WSSecurityException
password - The password to include in the key generationsalt - The Salt valueiteration - The Iteration value. If zero (0) is given the method uses the
default valueWSSecurityExceptionpublic static byte[] generateDerivedKey(String password, byte[] salt, int iteration) throws WSSecurityException
password - The password to include in the key generationsalt - The Salt valueiteration - The Iteration value. If zero (0) is given the method uses the
default valueWSSecurityExceptionpublic static byte[] generateSalt(boolean useForMac)
useForMac - If true define the Salt for use in a MACpublic static String doPasswordDigest(byte[] nonce, String created, String password) throws WSSecurityException
WSSecurityExceptionpublic static String doPasswordDigest(byte[] nonce, String created, byte[] password) throws WSSecurityException
WSSecurityExceptionpublic static byte[] doRawPasswordDigest(byte[] nonce,
String created,
byte[] password)
throws WSSecurityException
WSSecurityExceptionpublic static String getRawPassword(CallbackHandler callbackHandler, String username, String password, String passwordType) throws WSSecurityException
WSSecurityExceptionCopyright © 2004–2021 The Apache Software Foundation. All rights reserved.