This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Switch { | |
private Engine engine; | |
private boolean on; | |
public Switch(Engine engine) { | |
this.engine = engine; | |
this.on = false; | |
} | |
public boolean switchOn() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IP="127.0.0.1" | |
PORT="8877" | |
SHARED_SECRET="shared secret" | |
OPENSSL="/usr/local/opt/libressl/bin/openssl" | |
OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-gcm" | |
while IFS= read -r MSG; do | |
echo "$MSG" | $OPENSSL_CMD -e -k "$SHARED_SECRET" | |
echo |