public abstract class EncryptedValue extends Object
Check org.graylog2.security.encryption.EncryptedValueTest
for usage examples.
EncryptedValueDeserializer
automatically creates an
encrypted value for it. (admin wants to set a new password via HTTP request)
// Setting a new password
{
"set_value": "set a new password"
}
// Alternative to set a new password (pass a string instead of an object)
"set a new password"
// Keep existing value
{
"keep_value": true
}
// Delete existing value
{
"delete_value": true
}
{
"encrypted_value": "the encrypted value",
"salt": "the encryption salt"
}
{
"is_set": true
}
{
"encrypted_value": "the encrypted value",
"salt": "the encryption salt"
}
Modifier and Type | Class and Description |
---|---|
static class |
EncryptedValue.Builder |
Constructor and Description |
---|
EncryptedValue() |
Modifier and Type | Method and Description |
---|---|
static EncryptedValue.Builder |
builder() |
static EncryptedValue |
createUnset() |
static EncryptedValue |
createWithDeleteValue() |
static EncryptedValue |
createWithKeepValue() |
abstract boolean |
isDeleteValue() |
abstract boolean |
isKeepValue() |
boolean |
isSet() |
abstract String |
salt() |
abstract String |
value() |
public abstract String value()
public abstract String salt()
public abstract boolean isKeepValue()
public abstract boolean isDeleteValue()
public boolean isSet()
public static EncryptedValue createUnset()
public static EncryptedValue createWithKeepValue()
public static EncryptedValue createWithDeleteValue()
public static EncryptedValue.Builder builder()
Copyright © 2012–2021 Graylog, Inc.. All rights reserved.