Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ssh.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2000-03-24 12:45:49 +0300
committerSimon Tatham <anakin@pobox.com>2000-03-24 12:45:49 +0300
commit9922072a8d0c53222fb38665a85d1588f58b5d65 (patch)
tree5633b04cad0d9ee0f3796399556c0a5e8f0ed1c0 /ssh.h
parente32eae7db1c85b53e7fa1c1522b57b3cb510ddde (diff)
Peter Schellenbach's patch: re-implement the PuTTY cryptographic
functions as calls to the MS Crypto API. Not integrated into the Makefile yet, but should eventually allow building of an SSH-enabled PuTTY which contains no native crypto code, so it can be used everywhere (and anyone who can get the MS encryption pack can still use the SSH parts). [originally from svn r425]
Diffstat (limited to 'ssh.h')
-rw-r--r--ssh.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/ssh.h b/ssh.h
index d154af7b..f758174f 100644
--- a/ssh.h
+++ b/ssh.h
@@ -8,8 +8,13 @@
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,
@@ -24,9 +29,13 @@ typedef unsigned int uint32;
unsigned long crc32(const void *s, size_t len);
struct MD5Context {
- uint32 buf[4];
- uint32 bits[2];
- unsigned char in[64];
+#ifdef MSCRYPTOAPI
+ unsigned long hHash;
+#else
+ uint32 buf[4];
+ uint32 bits[2];
+ unsigned char in[64];
+#endif
};
void MD5Init(struct MD5Context *context);
@@ -40,7 +49,9 @@ 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);