Package org.nuxeo.common.codec
Class CryptoProperties
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,
Object>
Properties
with crypto capabilities.The cryptographic algorithms depend on:
- Environment.SERVER_STATUS_KEY
- Environment.CRYPT_KEYALIAS && Environment.CRYPT_KEYSTORE_PATH || getProperty(Environment.JAVA_DEFAULT_KEYSTORE)
- Environment.CRYPT_KEY
- Since:
- 7.4
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class java.util.Properties
defaults
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetProperty
(String key) getProperty
(String key, boolean raw) getRawProperty
(String key) getRawProperty
(String key, String defaultValue) Searches for the property with the specified key in this property list.void
load
(InputStream inStream) void
void
merge
(Object key, Object value, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) void
putIfAbsent
(Object key, Object value) boolean
boolean
Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, hashCode, isEmpty, keys, keySet, list, list, propertyNames, rehash, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
Constructor Details
-
CryptoProperties
-
CryptoProperties
public CryptoProperties()
-
-
Method Details
-
getCrypto
-
load
- Overrides:
load
in classProperties
- Throws:
IOException
-
load
- Overrides:
load
in classProperties
- Throws:
IOException
-
loadFromXML
- Overrides:
loadFromXML
in classProperties
- Throws:
IOException
InvalidPropertiesFormatException
-
put
-
putAll
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceMap<Object,
Object> - Overrides:
putIfAbsent
in classProperties
-
replace
-
replace
-
merge
-
getRawProperty
- Returns:
- the "raw" property: not decrypted if it was provided encrypted
-
getRawProperty
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.- Returns:
- the "raw" property (not decrypted if it was provided encrypted) or the
defaultValue
if not found - See Also:
-
getProperty
- Overrides:
getProperty
in classProperties
-
getProperty
- Parameters:
raw
- if the encrypted values must be returned encrypted (raw==true
) or decrypted (raw==false
)- Returns:
- the property value or null
-
remove
-
remove
-