mirror of
https://github.com/ipxe/ipxe
synced 2025-12-29 19:38:37 +03:00
[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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user