Browse Source

Fix prototypes

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
f5776dbef1
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      src/include/gpxe/crypto.h

+ 4
- 4
src/include/gpxe/crypto.h View File

@@ -33,13 +33,13 @@ struct crypto_algorithm {
33 33
 	 * @v keylen		Key length
34 34
 	 * @ret rc		Return status code
35 35
 	 */
36
-	int ( * setkey ) ( void *ctx, void *key, size_t keylen );
36
+	int ( * setkey ) ( void *ctx, const void *key, size_t keylen );
37 37
 	/** Set initialisation vector
38 38
 	 *
39 39
 	 * @v ctx		Context
40 40
 	 * @v iv		Initialisation vector
41 41
 	 */
42
-	void ( *setiv ) ( void *ctx, void *iv );
42
+	void ( *setiv ) ( void *ctx, const void *iv );
43 43
 	/** Encode data
44 44
 	 *
45 45
 	 * @v ctx		Context
@@ -92,12 +92,12 @@ static inline void digest_final ( struct crypto_algorithm *crypto,
92 92
 }
93 93
 
94 94
 static inline void cipher_setiv ( struct crypto_algorithm *crypto,
95
-				 void *ctx, void *iv ) {
95
+				  void *ctx, const void *iv ) {
96 96
 	crypto->setiv ( ctx, iv );
97 97
 }
98 98
 
99 99
 static inline int cipher_setkey ( struct crypto_algorithm *crypto,
100
-				  void *ctx, void *key, size_t keylen ) {
100
+				  void *ctx, const void *key, size_t keylen ) {
101 101
 	return crypto->setkey ( ctx, key, keylen );
102 102
 }
103 103
 

Loading…
Cancel
Save