org.relique.io
Class XORCipher
java.lang.Object
org.relique.io.XORCipher
- All Implemented Interfaces:
- CryptoFilter
public class XORCipher
- extends Object
- implements CryptoFilter
Example encryption filter that XOR's the all data with a secret seed value.
XORCipher
public XORCipher(String seed)
read
public int read(InputStream in)
throws IOException
- Specified by:
read
in interface CryptoFilter
- Throws:
IOException
read
public int read(InputStream in,
byte[] b)
throws IOException
- Specified by:
read
in interface CryptoFilter
- Throws:
IOException
read
public int read(InputStream in,
byte[] b,
int off,
int len)
throws IOException
- Specified by:
read
in interface CryptoFilter
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
write
public void write(OutputStream out,
int ch)
throws IOException
- Specified by:
write
in interface CryptoFilter
- Throws:
IOException
reset
public void reset()
- Specified by:
reset
in interface CryptoFilter
Copyright © 2016. All rights reserved.