From 402bc5743be6ab1420cabe418d26ec46ebbf563d Mon Sep 17 00:00:00 2001 From: clowwindy Date: Wed, 17 Sep 2014 00:11:50 +0800 Subject: [PATCH] add comment about buf --- shadowsocks/crypto/ctypes_openssl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/shadowsocks/crypto/ctypes_openssl.py b/shadowsocks/crypto/ctypes_openssl.py index b688765..88d9392 100644 --- a/shadowsocks/crypto/ctypes_openssl.py +++ b/shadowsocks/crypto/ctypes_openssl.py @@ -91,6 +91,7 @@ class CtypesCrypto(object): libcrypto.EVP_CipherUpdate(self._ctx, byref(buf), byref(cipher_out_len), c_char_p(data), len(data)) + # buf is copied to a str object when we access buf.raw return buf.raw[:cipher_out_len.value] def __del__(self):