net.nemerosa.ontrack.model.security.ConfidentialStore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-model Show documentation
Show all versions of ontrack-model Show documentation
Ontrack module: ontrack-model
package net.nemerosa.ontrack.model.security;
import java.io.IOException;
public interface ConfidentialStore {
/**
* Persists the payload of key to a persisted storage (such as disk.)
* The expectation is that the persisted form is secure.
*/
void store(String key, byte[] payload) throws IOException;
/**
* Reverse operation of {@link #store(String, byte[])}
*
* @return null the data has not been previously persisted, or if the data was tampered.
*/
byte[] load(String key) throws IOException;
/**
* Works like {@link java.security.SecureRandom#nextBytes(byte[])}.
*
* This enables implementations to consult other entropy sources, if it's available.
*/
byte[] randomBytes(int size);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy