[crypto] Split crypto_algorithm into {digest,cipher,pubkey}_algorithm

The various types of cryptographic algorithm are fundamentally
different, and it was probably a mistake to try to handle them via a
single common type.

pubkey_algorithm is a placeholder type for now.
This commit is contained in:
Michael Brown
2009-02-18 21:56:02 +00:00
parent 5de8305feb
commit a3219b24a8
16 changed files with 169 additions and 130 deletions

View File

@@ -10,12 +10,12 @@
#include <stdint.h>
#include <gpxe/md5.h>
struct crypto_algorithm;
struct digest_algorithm;
/** A CHAP response */
struct chap_response {
/** Digest algorithm used for the response */
struct crypto_algorithm *digest;
struct digest_algorithm *digest;
/** Context used by the digest algorithm */
uint8_t *digest_context;
/** CHAP response */
@@ -25,7 +25,7 @@ struct chap_response {
};
extern int chap_init ( struct chap_response *chap,
struct crypto_algorithm *digest );
struct digest_algorithm *digest );
extern void chap_update ( struct chap_response *chap, const void *data,
size_t len );
extern void chap_respond ( struct chap_response *chap );