﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.ucis.nl/index.php?action=history&amp;feed=atom&amp;title=NaCl%2FWindows</id>
	<title>NaCl/Windows - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.ucis.nl/index.php?action=history&amp;feed=atom&amp;title=NaCl%2FWindows"/>
	<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=NaCl/Windows&amp;action=history"/>
	<updated>2026-04-17T03:12:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>http://wiki.ucis.nl/index.php?title=NaCl/Windows&amp;diff=138&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=NaCl/Windows&amp;diff=138&amp;oldid=prev"/>
		<updated>2022-11-09T14:49:53Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:49, 9 November 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://wiki.ucis.nl/index.php?title=NaCl/Windows&amp;diff=137&amp;oldid=prev</id>
		<title>Admin: Fixed randombytes replacement</title>
		<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=NaCl/Windows&amp;diff=137&amp;oldid=prev"/>
		<updated>2014-01-04T13:22:56Z</updated>

		<summary type="html">&lt;p&gt;Fixed randombytes replacement&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:22, 4 January 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l25&quot;&gt;Line 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;cp &amp;quot;randombytes/devurandom.h&amp;quot; &amp;quot;$include/randombytes.h&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;cp &amp;quot;randombytes/devurandom.h&amp;quot; &amp;quot;$include/randombytes.h&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	echo &quot;#include &amp;lt;windows.h&gt;&quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	echo &quot;#include &amp;lt;Wincrypt.h&gt;&quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	echo &quot;#pragma comment(lib, \&quot;crypt32.lib\&quot;)&quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	echo &amp;quot;void randombytes(unsigned char * a,unsigned long long c) {&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	echo &amp;quot;void randombytes(unsigned char * a,unsigned long long c) {&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	echo &amp;quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;unsigned long long i&lt;/del&gt;;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	echo &amp;quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;HCRYPTPROV hProvider = 0&lt;/ins&gt;;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	echo &amp;quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;srand&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;time&lt;/del&gt;(0));&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	echo &amp;quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;while &lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1) {&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	echo &amp;quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;for &lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;i = 0; i &amp;lt; c; &lt;/del&gt;c&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;++&lt;/del&gt;, a&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;++&lt;/del&gt;) &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*a = rand&lt;/del&gt;() &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;% 256&lt;/del&gt;;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	echo &amp;quot;if &lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;!CryptAcquireContextW(&amp;amp;hProvider, 0, &lt;/ins&gt;0&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)&lt;/ins&gt;) &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{ Sleep(1&lt;/ins&gt;); &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;continue; }&lt;/ins&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	echo &amp;quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if (!CryptGenRandom(hProvider, &lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;DWORD)&lt;/ins&gt;c, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(BYTE*)&lt;/ins&gt;a)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;) { CryptReleaseContext(hProvider, 0); Sleep(1); continue; }&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	echo &amp;quot;CryptReleaseContext&lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;hProvider, 0&lt;/ins&gt;);&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	echo &amp;quot;break;&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	echo &amp;quot;}&lt;/ins&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	echo &amp;quot;}&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	echo &amp;quot;}&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;) &amp;gt; &amp;quot;$source/randombytes.c&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;) &amp;gt; &amp;quot;$source/randombytes.c&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://wiki.ucis.nl/index.php?title=NaCl/Windows&amp;diff=136&amp;oldid=prev</id>
		<title>Admin at 16:11, 12 February 2011</title>
		<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=NaCl/Windows&amp;diff=136&amp;oldid=prev"/>
		<updated>2011-02-12T16:11:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;To use [[NaCl]] cryptography on Windows, there are two options:&lt;br /&gt;
# Use a [[NaCl#C.23_.2F_.Net_implementation|C#/.Net port]]&lt;br /&gt;
# Compile the original NaCl code on Windows&lt;br /&gt;
&lt;br /&gt;
A native compile of the original sourcecode will usually give the best results in terms of speed and resemblance to the original library. To make compiling NaCl on windows somewhat less painful, I've written a shellscript that extracts/creates all files needed, including a VS.Net/VisualC++.Net 9 project file.&lt;br /&gt;
&lt;br /&gt;
Note that currently the build script does not support any platform specific optimized implementations of the cryptographic primitives. As a result, performance is usually comparable to or worse than the performance of the C#/.Net code.&lt;br /&gt;
&lt;br /&gt;
The script currently compiles all reference implementations, but only exports a limited set. If anything you need is not exported, this is easy to change by editing the .def file.&lt;br /&gt;
&lt;br /&gt;
The output of this script may also be useful to build the NaCl code for other previously unsupported platforms. It creates a file names sources.lst, which lists all the C source code files to compile. Don't forget to add the (generated) includes directory to the include path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh -e&lt;br /&gt;
top=&amp;quot;`pwd`/build/windows&amp;quot;&lt;br /&gt;
include=&amp;quot;$top/include&amp;quot;&lt;br /&gt;
source=&amp;quot;$top/source&amp;quot;&lt;br /&gt;
&lt;br /&gt;
export LANG=C&lt;br /&gt;
&lt;br /&gt;
rm -rf &amp;quot;$top&amp;quot;&lt;br /&gt;
mkdir -p &amp;quot;$top&amp;quot;&lt;br /&gt;
mkdir -p &amp;quot;$include&amp;quot;&lt;br /&gt;
mkdir -p &amp;quot;$source&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cp &amp;quot;randombytes/devurandom.h&amp;quot; &amp;quot;$include/randombytes.h&amp;quot;&lt;br /&gt;
(&lt;br /&gt;
	echo &amp;quot;void randombytes(unsigned char * a,unsigned long long c) {&amp;quot;&lt;br /&gt;
	echo &amp;quot;unsigned long long i;&amp;quot;&lt;br /&gt;
	echo &amp;quot;srand(time(0));&amp;quot;&lt;br /&gt;
	echo &amp;quot;for (i = 0; i &amp;lt; c; c++, a++) *a = rand() % 256;&amp;quot;&lt;br /&gt;
	echo &amp;quot;}&amp;quot;&lt;br /&gt;
) &amp;gt; &amp;quot;$source/randombytes.c&amp;quot;&lt;br /&gt;
echo &amp;quot;source/randombytes.c&amp;quot; &amp;gt; &amp;quot;$top/sources.lst&amp;quot;&lt;br /&gt;
&lt;br /&gt;
macros=`cat MACROS`&lt;br /&gt;
prototypesc=`cat PROTOTYPES.c`&lt;br /&gt;
prototypescpp=`cat PROTOTYPES.cpp`&lt;br /&gt;
cat OPERATIONS | while read o&lt;br /&gt;
do&lt;br /&gt;
	[ -d &amp;quot;$o&amp;quot; ] || continue&lt;br /&gt;
	ls &amp;quot;$o&amp;quot; | sort | while read p&lt;br /&gt;
	do&lt;br /&gt;
		[ -d &amp;quot;$o/$p&amp;quot; ] || continue&lt;br /&gt;
		[ -f &amp;quot;$o/$p/used&amp;quot; ] || continue&lt;br /&gt;
		op=&amp;quot;${o}_${p}&amp;quot;&lt;br /&gt;
		doth=&amp;quot;$o/$p/ref/api.h&amp;quot;&lt;br /&gt;
		implementationdir=`dirname $doth`&lt;br /&gt;
		opi=`echo &amp;quot;$implementationdir&amp;quot; | tr ./- ___`&lt;br /&gt;
		language=c&lt;br /&gt;
		echo &amp;quot;$op&amp;quot;&lt;br /&gt;
		(&lt;br /&gt;
			to=&amp;quot;${source}/${op}&amp;quot;&lt;br /&gt;
			mkdir -p &amp;quot;$to&amp;quot;&lt;br /&gt;
			cd &amp;quot;$implementationdir&amp;quot;&lt;br /&gt;
			cfiles=`ls | grep '\.c$' || :`&lt;br /&gt;
			sfiles=`ls | grep '\.[sS]$' || :`&lt;br /&gt;
			(&lt;br /&gt;
				echo &amp;quot;#ifndef ${o}_H&amp;quot;&lt;br /&gt;
				echo &amp;quot;#define ${o}_H&amp;quot;&lt;br /&gt;
				echo &amp;quot;&amp;quot;&lt;br /&gt;
				echo &amp;quot;#include \&amp;quot;${op}.h\&amp;quot;&amp;quot;&lt;br /&gt;
				echo &amp;quot;&amp;quot;&lt;br /&gt;
				echo &amp;quot;$macros&amp;quot; | egrep &amp;quot;${o}&amp;quot;'$|'&amp;quot;${o}&amp;quot;'\(|'&amp;quot;${o}&amp;quot;'_' | sed &amp;quot;s/$o/$op/&amp;quot; | while read mop&lt;br /&gt;
				do&lt;br /&gt;
					echo &amp;quot;#define ${mop} ${mop}&amp;quot; | sed &amp;quot;s/$op/$o/&amp;quot;&lt;br /&gt;
				done&lt;br /&gt;
				echo &amp;quot;#define ${o}_PRIMITIVE \&amp;quot;${p}\&amp;quot;&amp;quot;&lt;br /&gt;
				echo &amp;quot;#define ${o}_IMPLEMENTATION ${op}_IMPLEMENTATION&amp;quot;&lt;br /&gt;
				echo &amp;quot;#define ${o}_VERSION ${op}_VERSION&amp;quot;&lt;br /&gt;
				echo &amp;quot;&amp;quot;&lt;br /&gt;
				echo &amp;quot;#endif&amp;quot;&lt;br /&gt;
			) &amp;gt; &amp;quot;${to}/${o}.h&amp;quot;&lt;br /&gt;
			(&lt;br /&gt;
				echo &amp;quot;#ifndef ${op}_H&amp;quot;&lt;br /&gt;
				echo &amp;quot;#define ${op}_H&amp;quot;&lt;br /&gt;
				echo &amp;quot;&amp;quot;&lt;br /&gt;
				sed 's/[ 	]CRYPTO_/ '&amp;quot;${opi}&amp;quot;'_/g' &amp;lt; api.h&lt;br /&gt;
				echo '#ifdef __cplusplus'&lt;br /&gt;
				echo '#include &amp;lt;string&amp;gt;'&lt;br /&gt;
				echo &amp;quot;$prototypescpp&amp;quot; | egrep &amp;quot;${o}&amp;quot;'$|'&amp;quot;${o}&amp;quot;'\(|'&amp;quot;${o}&amp;quot;'_' | sed &amp;quot;s/$o/$opi/&amp;quot;&lt;br /&gt;
				echo 'extern &amp;quot;C&amp;quot; {'&lt;br /&gt;
				echo '#endif'&lt;br /&gt;
				echo &amp;quot;$prototypesc&amp;quot; | egrep &amp;quot;${o}&amp;quot;'$|'&amp;quot;${o}&amp;quot;'\(|'&amp;quot;${o}&amp;quot;'_' | sed &amp;quot;s/$o/$opi/&amp;quot;&lt;br /&gt;
				echo '#ifdef __cplusplus'&lt;br /&gt;
				echo '}'&lt;br /&gt;
				echo '#endif'&lt;br /&gt;
				echo &amp;quot;&amp;quot;&lt;br /&gt;
				echo &amp;quot;$macros&amp;quot; | egrep &amp;quot;${o}&amp;quot;'$|'&amp;quot;${o}&amp;quot;'\(|'&amp;quot;${o}&amp;quot;'_' | sed &amp;quot;s/$o/$opi/&amp;quot; | while read mopi&lt;br /&gt;
				do&lt;br /&gt;
					echo &amp;quot;#define ${mopi} ${mopi}&amp;quot; | sed &amp;quot;s/$opi/$op/&amp;quot;&lt;br /&gt;
				done&lt;br /&gt;
				echo &amp;quot;#define ${op}_IMPLEMENTATION \&amp;quot;${implementationdir}\&amp;quot;&amp;quot;&lt;br /&gt;
				echo &amp;quot;#ifndef ${opi}_VERSION&amp;quot;&lt;br /&gt;
				echo &amp;quot;#define ${opi}_VERSION \&amp;quot;-\&amp;quot;&amp;quot;&lt;br /&gt;
				echo &amp;quot;#endif&amp;quot;&lt;br /&gt;
				echo &amp;quot;#define ${op}_VERSION ${opi}_VERSION&amp;quot;&lt;br /&gt;
				echo &amp;quot;&amp;quot;&lt;br /&gt;
				echo &amp;quot;#endif&amp;quot;&lt;br /&gt;
			) &amp;gt; &amp;quot;${to}/${op}.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
			for f in $cfiles $sfiles&lt;br /&gt;
			do&lt;br /&gt;
				echo &amp;quot;${op}_${f}&amp;quot;&lt;br /&gt;
				cp &amp;quot;$f&amp;quot; &amp;quot;${to}/${op}_${f}&amp;quot;&lt;br /&gt;
				echo &amp;quot;source/${op}/${op}_${f}&amp;quot; &amp;gt;&amp;gt; &amp;quot;$top/sources.lst&amp;quot;&lt;br /&gt;
			done&lt;br /&gt;
&lt;br /&gt;
			cp -p &amp;quot;${to}/$op.h&amp;quot; &amp;quot;$include/$op.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
			[ -f &amp;quot;../selected&amp;quot; ]  || continue&lt;br /&gt;
			cp -p &amp;quot;${to}/$o.h&amp;quot; &amp;quot;$include/$o.h&amp;quot;&lt;br /&gt;
		)&lt;br /&gt;
	done&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
(&lt;br /&gt;
	echo &amp;quot;LIBRARY	\&amp;quot;nacl\&amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;EXPORTS&amp;quot;&lt;br /&gt;
	echo &amp;quot;	crypto_box_curve25519xsalsa20poly1305_ref&amp;quot;&lt;br /&gt;
	echo &amp;quot;	crypto_box_curve25519xsalsa20poly1305_ref_open&amp;quot;&lt;br /&gt;
	echo &amp;quot;	crypto_box_curve25519xsalsa20poly1305_ref_keypair&amp;quot;&lt;br /&gt;
	echo &amp;quot;	crypto_box_curve25519xsalsa20poly1305_ref_beforenm&amp;quot;&lt;br /&gt;
	echo &amp;quot;	crypto_box_curve25519xsalsa20poly1305_ref_afternm&amp;quot;&lt;br /&gt;
	echo &amp;quot;	crypto_box_curve25519xsalsa20poly1305_ref_open_afternm&amp;quot;&lt;br /&gt;
) &amp;gt; &amp;quot;$top/nacl.def&amp;quot;&lt;br /&gt;
&lt;br /&gt;
(&lt;br /&gt;
	echo &amp;quot;&amp;lt;?xml version='1.0' encoding='Windows-1252'?&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;VisualStudioProject ProjectType='Visual C++' Version='9,00' Name='nacl' RootNamespace='NaCl'&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;Platforms&amp;gt;&amp;lt;Platform Name='Win32' /&amp;gt;&amp;lt;/Platforms&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;ToolFiles&amp;gt;&amp;lt;/ToolFiles&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;Configurations&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;Configuration Name='Release|Win32'&amp;quot;&lt;br /&gt;
	echo &amp;quot;OutputDirectory='\$(ProjectDir)\$(ConfigurationName)' IntermediateDirectory='\$(ConfigurationName)'&amp;quot;&lt;br /&gt;
	echo &amp;quot;ConfigurationType='2' CharacterSet='2' WholeProgramOptimization='1'&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;Tool Name='VCCLCompilerTool' AdditionalIncludeDirectories='include\\' /&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;Tool Name='VCLinkerTool' ModuleDefinitionFile='nacl.def' /&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;/Configuration&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;/Configurations&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;References&amp;gt;&amp;lt;/References&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;Files&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;Filter Name='Source Files' Filter='cpp;c;s'&amp;gt;&amp;quot;&lt;br /&gt;
	sed &amp;quot;s_/_\\\\_g&amp;quot; &amp;quot;$top/sources.lst&amp;quot; | sed &amp;quot;s_^\\(.*\\)\$_&amp;lt;File RelativePath='\\1' /&amp;gt;_&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;/Filter&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;File RelativePath='nacl.def' /&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;/Files&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;Globals&amp;gt;&amp;lt;/Globals&amp;gt;&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;lt;/VisualStudioProject&amp;gt;&amp;quot;&lt;br /&gt;
) &amp;gt; &amp;quot;$top/nacl.vcproj&amp;quot;&lt;br /&gt;
&lt;br /&gt;
rm &amp;quot;$top/sources.lst&amp;quot;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>