summaryrefslogtreecommitdiff
path: root/pipermail/pycrypto/2010q3/000266.html
blob: 694fdb90900f9c212bda73eeb6fd490ceacbdfff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [pycrypto] winrandom alternative (Namely for 64-bit Windows)
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20winrandom%20alternative%20%28Namely%20for%2064-bit%20Windows%29&In-Reply-To=">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="000432.html">
   <LINK REL="Next"  HREF="000267.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[pycrypto] winrandom alternative (Namely for 64-bit Windows)</H1>
    <B>Gregory Taylor</B> 
    <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20winrandom%20alternative%20%28Namely%20for%2064-bit%20Windows%29&In-Reply-To="
       TITLE="[pycrypto] winrandom alternative (Namely for 64-bit Windows)">gtaylor at duointeractive.com
       </A><BR>
    <I>Tue Aug 24 14:03:33 CST 2010</I>
    <P><UL>
        <LI>Previous message: <A HREF="000432.html">[pycrypto] winrandom alternative
</A></li>
        <LI>Next message: <A HREF="000267.html">[pycrypto] winrandom alternative (Namely for 64-bit Windows)
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#266">[ date ]</a>
              <a href="thread.html#266">[ thread ]</a>
              <a href="subject.html#266">[ subject ]</a>
              <a href="author.html#266">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Hello,

I'm not sure if this is the best place for something like this, but I figured I'd share a workaround and a suggestion for others to take or leave. I'm currently running a 64-bit Windows 7 machine for testing some of our codebase on Windows, and ran into a snag while installing PyCrypto (so I could use Fabric, which depends on Paramiko, which depends on PyCrypto). 

As you are probably aware of, PyCrypto tries to download/compile winrandom, which can be a problem for many that lack a compiler. As an alternative for those who can't/won't install winrandom, I put together a ctypes equivalent that doesn't require compilation like the original winrandom. This new module aims to be functionally equivalent in every way to winrandom, but accesses the Windows-specific cryptography library through ctypes rather than a compiled Python C extension module.

The PyPi page can be found at: <A HREF="http://pypi.python.org/pypi/winrandom-ctypes/">http://pypi.python.org/pypi/winrandom-ctypes/</A>
The Github page can be found at: <A HREF="http://github.com/duointeractive/winrandom-ctypes">http://github.com/duointeractive/winrandom-ctypes</A>

I understand that going the ctypes route might raise the minimum Python version required (2.4 or 2.5?), so this probably isn't a one-size-fits-all solution. However, if there was anything that could be done to make it easier for a user to elect to use the ctypes version, that'd be great. Perhaps PyCrypto could check at install time whether winrandom is already installed, and skip trying to compile/re-install it (winrandom-ctypes provides winrandom) to allow a user to plug something else in (winrandom-ctypes?).

Just thought I'd throw this out here for those who might find it useful in the painful situation that they have to develop on Windows.

Greg Taylor
<A HREF="http://duointeractive.com">http://duointeractive.com</A>
DUO Interactive, LLC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <A HREF="http://lists.dlitz.net/pipermail/pycrypto/attachments/20100824/8b0898ce/attachment.htm">http://lists.dlitz.net/pipermail/pycrypto/attachments/20100824/8b0898ce/attachment.htm</A> 
</PRE>




<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000432.html">[pycrypto] winrandom alternative
</A></li>
	<LI>Next message: <A HREF="000267.html">[pycrypto] winrandom alternative (Namely for 64-bit Windows)
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#266">[ date ]</a>
              <a href="thread.html#266">[ thread ]</a>
              <a href="subject.html#266">[ subject ]</a>
              <a href="author.html#266">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">More information about the pycrypto
mailing list</a><br>
</body></html>