Package jenkins.security
Class ConfidentialStore.Mock
java.lang.Object
jenkins.security.ConfidentialStore
jenkins.security.ConfidentialStore.Mock
- Enclosing class:
ConfidentialStore
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public static final class ConfidentialStore.Mock
extends ConfidentialStore
-
Nested Class Summary
Nested classes/interfaces inherited from class jenkins.security.ConfidentialStore
ConfidentialStore.Mock -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()protected byte[]load(ConfidentialKey key) Reverse operation ofConfidentialStore.store(ConfidentialKey, byte[])byte[]randomBytes(int size) Works likeSecureRandom.nextBytes(byte[]).protected voidstore(ConfidentialKey key, byte[] payload) Persists the payload ofConfidentialKeyto a persisted storage (such as disk.) The expectation is that the persisted form is secure.Methods inherited from class jenkins.security.ConfidentialStore
get
-
Field Details
-
INSTANCE
-
-
Method Details
-
clear
public void clear() -
store
Description copied from class:ConfidentialStorePersists the payload ofConfidentialKeyto a persisted storage (such as disk.) The expectation is that the persisted form is secure.- Specified by:
storein classConfidentialStore- Throws:
IOException
-
load
Description copied from class:ConfidentialStoreReverse operation ofConfidentialStore.store(ConfidentialKey, byte[])- Specified by:
loadin classConfidentialStore- Returns:
- null the data has not been previously persisted, or if the data was tampered.
- Throws:
IOException
-
randomBytes
public byte[] randomBytes(int size) Description copied from class:ConfidentialStoreWorks likeSecureRandom.nextBytes(byte[]). This enables implementations to consult other entropy sources, if it's available.- Specified by:
randomBytesin classConfidentialStore
-