]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - ssh.h
Silly mistake - restore-cursor-pos doesn't make sure the cursor
[PuTTY.git] / ssh.h
diff --git a/ssh.h b/ssh.h
index 5c72eeb1f45b9153e1f451889c785957a9aae38d..3d4efab73dfadfd777beb496f21559d5d8f778f2 100644 (file)
--- a/ssh.h
+++ b/ssh.h
@@ -1,10 +1,20 @@
 #include <string.h>
 
+#define SSH_CIPHER_IDEA                1
+#define SSH_CIPHER_DES         2
+#define SSH_CIPHER_3DES                3
+#define SSH_CIPHER_BLOWFISH    6
+
 struct RSAKey {
     int bits;
     int bytes;
+#ifdef MSCRYPTOAPI
+    unsigned long exponent;
+    unsigned char *modulus;
+#else
     void *modulus;
     void *exponent;
+#endif
 };
 
 int makekey(unsigned char *data, struct RSAKey *result,
@@ -16,12 +26,21 @@ void rsastr_fmt(char *str, struct RSAKey *key);
 typedef unsigned int word32;
 typedef unsigned int uint32;
 
-unsigned long crc32(const unsigned char *s, unsigned int len);
+unsigned long crc32(const void *s, size_t len);
+
+typedef struct {
+    uint32 h[4];
+} MD5_Core_State;
 
 struct MD5Context {
-        uint32 buf[4];
-        uint32 bits[2];
-        unsigned char in[64];
+#ifdef MSCRYPTOAPI
+    unsigned long hHash;
+#else
+    MD5_Core_State core;
+    unsigned char block[64];
+    int blkused;
+    uint32 lenhi, lenlo;
+#endif
 };
 
 void MD5Init(struct MD5Context *context);
@@ -35,7 +54,18 @@ struct ssh_cipher {
     void (*decrypt)(unsigned char *blk, int len);
 };
 
+#ifndef MSCRYPTOAPI
 void SHATransform(word32 *digest, word32 *data);
+#endif
 
 int random_byte(void);
 void random_add_noise(void *noise, int length);
+
+void logevent (char *);
+
+int ssh_compression_init(int);
+void ssh_compress(unsigned char *src, unsigned int srclen,
+                  unsigned char **dest, unsigned int *destlen);
+void ssh_decompress(unsigned char *src, unsigned int srclen,
+                    unsigned char **dest, unsigned int *destlen);
+