Loading src/common/crypto.c +8 −2 Original line number Diff line number Diff line Loading @@ -807,6 +807,12 @@ int crypto_cipher_decrypt(crypto_cipher_env_t *env, unsigned char *from, unsigne } } int crypto_cipher_rewind(crypto_cipher_env_t *env, long delta) { return crypto_cipher_advance(env, -delta); } int crypto_cipher_advance(crypto_cipher_env_t *env, long delta) { Loading Loading @@ -841,8 +847,8 @@ crypto_new_digest_env(int type) void crypto_free_digest_env(crypto_digest_env_t *digest) { assert(digest); tor_free(digest); if(digest) free(digest); } void Loading src/common/crypto.h +1 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ int crypto_cipher_encrypt(crypto_cipher_env_t *env, unsigned char *from, unsigne int crypto_cipher_decrypt(crypto_cipher_env_t *env, unsigned char *from, unsigned int fromlen, unsigned char *to); /* only implemented for CRYPTO_CIPHER_AES_CTR */ int crypto_cipher_rewind(crypto_cipher_env_t *env, long delta); int crypto_cipher_advance(crypto_cipher_env_t *env, long delta); /* convenience function: wraps crypto_create_crypto_env, set_key, set_iv, and init. */ Loading Loading
src/common/crypto.c +8 −2 Original line number Diff line number Diff line Loading @@ -807,6 +807,12 @@ int crypto_cipher_decrypt(crypto_cipher_env_t *env, unsigned char *from, unsigne } } int crypto_cipher_rewind(crypto_cipher_env_t *env, long delta) { return crypto_cipher_advance(env, -delta); } int crypto_cipher_advance(crypto_cipher_env_t *env, long delta) { Loading Loading @@ -841,8 +847,8 @@ crypto_new_digest_env(int type) void crypto_free_digest_env(crypto_digest_env_t *digest) { assert(digest); tor_free(digest); if(digest) free(digest); } void Loading
src/common/crypto.h +1 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ int crypto_cipher_encrypt(crypto_cipher_env_t *env, unsigned char *from, unsigne int crypto_cipher_decrypt(crypto_cipher_env_t *env, unsigned char *from, unsigned int fromlen, unsigned char *to); /* only implemented for CRYPTO_CIPHER_AES_CTR */ int crypto_cipher_rewind(crypto_cipher_env_t *env, long delta); int crypto_cipher_advance(crypto_cipher_env_t *env, long delta); /* convenience function: wraps crypto_create_crypto_env, set_key, set_iv, and init. */ Loading