]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/crypto_ms.h
Merge pull request #409 from enaess/conf-fixes
[ppp.git] / pppd / crypto_ms.h
index 90835940e0589e9a79b2add18d10e05bf2408855..38111fdf70701e07036158d11ce825d8317e4fb9 100644 (file)
 
 #include "pppdconf.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * This is the DES encrypt functions as described by RFC2759.
  * 
  * Parameters:
- * unsigned char *clear:
+ * const unsigned char *clear:
  *      A 8 byte input array to be encrypted
  * 
- * unsigned char *key: 
+ * const unsigned char *key:
  *      A raw 7-byte array to be expanded to 8 with odd-parity
  *
  * unsigned char *cipher:
  *
  * DesEncrypt returns 1 on success
  */
-int DesEncrypt(unsigned char *clear, unsigned char *key, 
+int DesEncrypt(const unsigned char *clear, const unsigned char *key,
         unsigned char *cipher);
 
 /**
  * This is the DES decrypt functions as described by RFC2759.
  * 
  * Parameters:
- * unsigned char *cipher:
+ * const unsigned char *cipher:
  *      A 8 byte input array to be decrypted
  *
- * unsigned char *key: 
+ * const unsigned char *key:
  *      A raw 7-byte array to be expanded to a 8-byte key with odd-parity
  *
  * unsigned char *clear:
@@ -69,7 +73,11 @@ int DesEncrypt(unsigned char *clear, unsigned char *key,
  *
  * DesDecrypt returns 1 on success
  */
-int DesDecrypt(unsigned char *cipher, unsigned char *key, 
+int DesDecrypt(const unsigned char *cipher, const unsigned char *key,
         unsigned char *clear);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* PPP_PPPCRYPT_H */