gpg: allow symmetric encryption with a passphrase

This commit is contained in:
Roman Zeyde
2018-04-25 11:09:58 +03:00
parent ccc2174775
commit bea899d1ef
3 changed files with 26 additions and 8 deletions

View File

@@ -48,9 +48,9 @@ def communicate(sock, msg):
return recvline(sock)
def sendline(sock, msg):
def sendline(sock, msg, confidential=False):
"""Send a binary message, followed by EOL."""
log.debug('<- %r', msg)
log.debug('<- %r', ('<snip>' if confidential else msg))
sock.sendall(msg + b'\n')