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 TypeMethodDescriptionvoid
clear()
protected byte[]
load
(ConfidentialKey key) Reverse operation ofConfidentialStore.store(ConfidentialKey, byte[])
byte[]
randomBytes
(int size) Works likeSecureRandom.nextBytes(byte[])
.protected void
store
(ConfidentialKey key, byte[] payload) Persists the payload ofConfidentialKey
to 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:ConfidentialStore
Persists the payload ofConfidentialKey
to a persisted storage (such as disk.) The expectation is that the persisted form is secure.- Specified by:
store
in classConfidentialStore
- Throws:
IOException
-
load
Description copied from class:ConfidentialStore
Reverse operation ofConfidentialStore.store(ConfidentialKey, byte[])
- Specified by:
load
in 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:ConfidentialStore
Works likeSecureRandom.nextBytes(byte[])
. This enables implementations to consult other entropy sources, if it's available.- Specified by:
randomBytes
in classConfidentialStore
-