Skip to content

Commit

Permalink
[mod] removed trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
stf committed Sep 12, 2014
1 parent 1047aa6 commit cf0fb5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pysodium/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def crypto_aead_chacha20poly1305_decrypt(ciphertext,
ad,
nonce,
key):

m = ctypes.create_string_buffer(len(ciphertext)-16L)
mlen = ctypes.c_ulonglong(0)
clen = ctypes.c_ulonglong(len(ciphertext))
Expand All @@ -139,7 +139,7 @@ def crypto_aead_chacha20poly1305_decrypt(ciphertext,
adlen = ctypes.c_ulonglong(len(ad))
else:
adlen = ctypes.c_ulonglong(0)

if not sodium.crypto_aead_chacha20poly1305_decrypt(m,
ctypes.byref(mlen),
None,
Expand All @@ -150,9 +150,9 @@ def crypto_aead_chacha20poly1305_decrypt(ciphertext,
nonce,
key) == 0:
raise ValueError
else:
else:
return m.raw

# crypto_generichash(unsigned char *out, size_t outlen, const unsigned char *in, unsigned long long inlen, const unsigned char *key, size_t keylen)
def crypto_generichash(m, k=b'', outlen=crypto_generichash_BYTES):
buf = ctypes.create_string_buffer(outlen)
Expand Down

0 comments on commit cf0fb5c

Please sign in to comment.