Browse Source

low_level crypto: minor cleanup

HMAC is not used, we use hmac from py stdlib.
Thomas Waldmann 2 years ago
parent
commit
44f58b0870
1 changed files with 2 additions and 11 deletions
  1. 2 11
      src/borg/crypto/low_level.pyx

+ 2 - 11
src/borg/crypto/low_level.pyx

@@ -63,6 +63,8 @@ cdef extern from "openssl/evp.h":
     const EVP_CIPHER *EVP_aes_256_ocb()
     const EVP_CIPHER *EVP_chacha20_poly1305()
 
+    EVP_CIPHER_CTX *EVP_CIPHER_CTX_new()
+    void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a)
     void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a)
     void EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a)
 
@@ -82,17 +84,6 @@ cdef extern from "openssl/evp.h":
     int EVP_CTRL_AEAD_SET_TAG
     int EVP_CTRL_AEAD_SET_IVLEN
 
-    const EVP_MD *EVP_sha256() nogil
-
-    EVP_CIPHER_CTX *EVP_CIPHER_CTX_new()
-    void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a)
-
-cdef extern from "openssl/hmac.h":
-    unsigned char *HMAC(const EVP_MD *evp_md,
-                    const void *key, int key_len,
-                    const unsigned char *data, int data_len,
-                    unsigned char *md, unsigned int *md_len) nogil
-
 
 import struct