public class SecureSocketWriteStrategy extends AbstractWriteStrategy implements Encryptable
HASH_ALGORITHM, hexArray, NONCE_SIZE, nonceAlphabet, r| Constructor and Description |
|---|
SecureSocketWriteStrategy(java.net.Socket socket) |
SecureSocketWriteStrategy(java.net.Socket socket,
java.io.DataOutputStream stream) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
decrypt(java.lang.String msg,
java.lang.String key) |
void |
encrypt(java.lang.String msg,
java.lang.String key) |
void |
write(Sendable s)
Write data to socket
|
close, getStream, setStreamequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbytesToHex, generateHashedPassword, generateKey, xorDecrypt, xorEncryptpublic SecureSocketWriteStrategy(java.net.Socket socket)
public SecureSocketWriteStrategy(java.net.Socket socket,
java.io.DataOutputStream stream)
public void write(Sendable s) throws java.io.IOException
WriteStrategywrite in interface WriteStrategys - object to be written to socketjava.io.IOException - When there is an error writing to streampublic void encrypt(java.lang.String msg,
java.lang.String key)
encrypt in interface Encryptablepublic <T> T decrypt(java.lang.String msg,
java.lang.String key)
decrypt in interface Encryptable