diff options
Diffstat (limited to 'src/crypto/cipher.c')
-rw-r--r-- | src/crypto/cipher.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/crypto/cipher.c b/src/crypto/cipher.c index 9c392009..f83a6d0f 100644 --- a/src/crypto/cipher.c +++ b/src/crypto/cipher.c @@ -2,23 +2,23 @@ #include <errno.h> #include <gpxe/crypto.h> -int cipher_encrypt ( struct crypto_algorithm *crypto, +int cipher_encrypt ( struct cipher_algorithm *cipher, void *ctx, const void *src, void *dst, size_t len ) { - if ( ( len & ( crypto->blocksize - 1 ) ) ) { + if ( ( len & ( cipher->blocksize - 1 ) ) ) { return -EINVAL; } - crypto->encode ( ctx, src, dst, len ); + cipher->encrypt ( ctx, src, dst, len ); return 0; } -int cipher_decrypt ( struct crypto_algorithm *crypto, +int cipher_decrypt ( struct cipher_algorithm *cipher, void *ctx, const void *src, void *dst, size_t len ) { - if ( ( len & ( crypto->blocksize - 1 ) ) ) { + if ( ( len & ( cipher->blocksize - 1 ) ) ) { return -EINVAL; } - crypto->decode ( ctx, src, dst, len ); + cipher->decrypt ( ctx, src, dst, len ); return 0; } |