aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2009-02-18 22:27:34 +0000
committerMichael Brown <mcb30@etherboot.org>2009-02-19 00:06:41 +0000
commitb4d3d686cc67c2503976ec4c854efc3a20519203 (patch)
treec194d6d6a4b6fb93fae56bc6ac9a81607048861d /src/crypto
parenta3219b24a8ea4699e7b04cf1f1131aade9fcd855 (diff)
downloadipxe-b4d3d686cc67c2503976ec4c854efc3a20519203.tar.gz
[crypto] Change cipher_{en,de}crypt() to void functions
It is a programming error, not a runtime error, if we attempt to use block ciphers with an incorrect blocksize, so use an assert() rather than an error status return.
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/cipher.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/crypto/cipher.c b/src/crypto/cipher.c
deleted file mode 100644
index f83a6d0f..00000000
--- a/src/crypto/cipher.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <stdint.h>
-#include <errno.h>
-#include <gpxe/crypto.h>
-
-int cipher_encrypt ( struct cipher_algorithm *cipher,
- void *ctx, const void *src, void *dst,
- size_t len ) {
- if ( ( len & ( cipher->blocksize - 1 ) ) ) {
- return -EINVAL;
- }
- cipher->encrypt ( ctx, src, dst, len );
- return 0;
-}
-
-int cipher_decrypt ( struct cipher_algorithm *cipher,
- void *ctx, const void *src, void *dst,
- size_t len ) {
- if ( ( len & ( cipher->blocksize - 1 ) ) ) {
- return -EINVAL;
- }
- cipher->decrypt ( ctx, src, dst, len );
- return 0;
-}
-