Browse Source

The null crypto algorithm should at least copy data...

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
a502fcda45
1 changed files with 7 additions and 6 deletions
  1. 7
    6
      src/crypto/crypto_null.c

+ 7
- 6
src/crypto/crypto_null.c View File

22
  * Null crypto algorithm
22
  * Null crypto algorithm
23
  */
23
  */
24
 
24
 
25
+#include <string.h>
25
 #include <gpxe/crypto.h>
26
 #include <gpxe/crypto.h>
26
 
27
 
27
 static void null_init ( void *ctx __unused ) {
28
 static void null_init ( void *ctx __unused ) {
34
 	return 0;
35
 	return 0;
35
 }
36
 }
36
 
37
 
37
-static void null_encode ( void *ctx __unused, const void *src __unused,
38
-			  void *dst __unused, size_t len __unused ) {
39
-	/* Do nothing */
38
+static void null_encode ( void *ctx __unused, const void *src,
39
+			  void *dst, size_t len ) {
40
+	memcpy ( dst, src, len );
40
 }
41
 }
41
 
42
 
42
-static void null_decode ( void *ctx __unused, const void *src __unused,
43
-			  void *dst __unused, size_t len __unused ) {
44
-	/* Do nothing */
43
+static void null_decode ( void *ctx __unused, const void *src,
44
+			  void *dst, size_t len ) {
45
+	memcpy ( dst, src, len );
45
 }
46
 }
46
 
47
 
47
 static void null_final ( void *ctx __unused, void *out __unused ) {
48
 static void null_final ( void *ctx __unused, void *out __unused ) {

Loading…
Cancel
Save