public static class XORBinaryManager.XORBinaryScrambler extends Object implements BinaryScrambler
BinaryScrambler
that does an XOR with the given pattern.Constructor and Description |
---|
XORBinaryManager.XORBinaryScrambler(byte[] pattern) |
Modifier and Type | Method and Description |
---|---|
Binary |
getUnscrambledBinary(File file,
String digest,
String repoName)
Gets an unscrambled
Binary for the given file. |
void |
reset()
Reset scrambling from start.
|
void |
scrambleBuffer(byte[] buf,
int off,
int n)
Scramble a buffer at the given offset for n bytes.
|
void |
skip(long n)
Skips n bytes during unscrambling.
|
void |
unscrambleBuffer(byte[] buf,
int off,
int n)
Unscramble a buffer at the given offset for n bytes.
|
public XORBinaryManager.XORBinaryScrambler(byte[] pattern)
public void scrambleBuffer(byte[] buf, int off, int n)
BinaryScrambler
scrambleBuffer
in interface BinaryScrambler
public void unscrambleBuffer(byte[] buf, int off, int n)
BinaryScrambler
unscrambleBuffer
in interface BinaryScrambler
public Binary getUnscrambledBinary(File file, String digest, String repoName)
BinaryScrambler
Binary
for the given file.getUnscrambledBinary
in interface BinaryScrambler
public void skip(long n)
BinaryScrambler
skip
in interface BinaryScrambler
public void reset()
BinaryScrambler
reset
in interface BinaryScrambler
Copyright © 2011 Nuxeo SA. All Rights Reserved.