Skip to content

Commit

Permalink
low_level crypto: minor cleanup
Browse files Browse the repository at this point in the history
HMAC is not used, we use hmac from py stdlib.
  • Loading branch information
ThomasWaldmann committed May 11, 2023
1 parent 8ba04bb commit 44f58b0
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/borg/crypto/low_level.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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

Expand Down

0 comments on commit 44f58b0

Please sign in to comment.