public class XORBinaryManager extends LocalBinaryManager
The RepositoryDescriptor
holds a key that can be used to drive the
scrambling/unscrambling.
This is to prevent casual reading of the files, but of course the algorithm and key for scrambling are available on the system as well, so this not a secure store.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractBinaryManager.NullBinaryScrambler
A
BinaryScrambler that does nothing. |
static class |
AbstractBinaryManager.ScrambledBinary
A
Binary that is unscrambled on read using a
BinaryScrambler . |
static class |
AbstractBinaryManager.ScrambledFileInputStream
A
FileInputStream that is unscrambled on read using a
BinaryScrambler . |
static class |
AbstractBinaryManager.ScrambledStreamSource
A
FileSource that is unscrambled on read using a
BinaryScrambler . |
static class |
XORBinaryManager.XORBinaryScrambler
A
BinaryScrambler that does an XOR with the given pattern. |
LocalBinaryManager.DefaultBinaryGarbageCollector
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DEPTH |
static String |
DEFAULT_DIGEST |
static int |
MAX_BUF_SIZE |
static int |
MIN_BUF_SIZE |
CONFIG_FILE, DATA, DEFAULT_PATH, TMP
Constructor and Description |
---|
XORBinaryManager() |
Modifier and Type | Method and Description |
---|---|
BinaryGarbageCollector |
getGarbageCollector()
Returns the Binary Garbage Collector that can be used for this binary
manager.
|
void |
initialize(RepositoryDescriptor repositoryDescriptor)
Initializer.
|
static String |
toHexString(byte[] data) |
getBinary, getBinary, getFileForDigest, getStorageDir, touch
public static final String DEFAULT_DIGEST
public static final int DEFAULT_DEPTH
public static final int MIN_BUF_SIZE
public static final int MAX_BUF_SIZE
public void initialize(RepositoryDescriptor repositoryDescriptor) throws IOException
BinaryManager
initialize
in interface BinaryManager
initialize
in class LocalBinaryManager
IOException
public static String toHexString(byte[] data)
public BinaryGarbageCollector getGarbageCollector()
BinaryManager
Several calls to this method will return the same GC, so that its status
can be monitored using BinaryGarbageCollector.isInProgress()
.
getGarbageCollector
in interface BinaryManager
Copyright © 2013 Nuxeo SA. All Rights Reserved.