Package org.jboss.security.vault
Class SecurityVaultUtil
- java.lang.Object
-
- org.jboss.security.vault.SecurityVaultUtil
-
public class SecurityVaultUtil extends Object
Common utility methods associated with theSecurityVault
- Author:
- anil saldhana
-
-
Field Summary
Fields Modifier and Type Field Description static String
VAULT_PREFIX
-
Constructor Summary
Constructors Constructor Description SecurityVaultUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static char[]
getValue(char[] chars)
Get the value from the vaultstatic char[]
getValue(String vaultString)
Given the vault formatted string, retrieve the attribute value from the vaultstatic String
getValueAsString(String vaultString)
static boolean
isVaultFormat(char[] chars)
Check whether the string has the format of the vaultstatic boolean
isVaultFormat(String str)
Check whether the string has the format of the vault
-
-
-
Field Detail
-
VAULT_PREFIX
public static final String VAULT_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
isVaultFormat
public static boolean isVaultFormat(char[] chars)
Check whether the string has the format of the vault- Parameters:
chars
-- Returns:
-
isVaultFormat
public static boolean isVaultFormat(String str)
Check whether the string has the format of the vault- Parameters:
str
-- Returns:
-
getValue
public static char[] getValue(String vaultString) throws SecurityVaultException
Given the vault formatted string, retrieve the attribute value from the vault
Note: the vault formatted string will be of the form VAULT::vault_block::attribute_name::sharedKey
Vault Block acts as the unique id of a block such as "messaging", "security" etc Attribute Name is the name of the attribute whose value we are preserving Shared Key is the key generated by the off line vault during storage of the attribute value
- Parameters:
vaultString
-- Returns:
- Throws:
SecurityVaultException
-
getValueAsString
public static String getValueAsString(String vaultString) throws SecurityVaultException
- Parameters:
vaultString
-- Returns:
- Throws:
SecurityVaultException
- See Also:
getValue(String)
-
getValue
public static char[] getValue(char[] chars) throws SecurityVaultException
Get the value from the vault- Parameters:
chars
- vaultified set of characters- Returns:
- Throws:
SecurityVaultException
-
-