<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ARadioGatun32%2Fdoc</id>
	<title>Module:RadioGatun32/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ARadioGatun32%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:RadioGatun32/doc&amp;action=history"/>
	<updated>2026-05-27T13:41:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:RadioGatun32/doc&amp;diff=144569&amp;oldid=prev</id>
		<title>imported&gt;Samboy: There’s some mediawiki module out there which didn’t like the old colors, so let’s fix that</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:RadioGatun32/doc&amp;diff=144569&amp;oldid=prev"/>
		<updated>2022-09-15T18:17:57Z</updated>

		<summary type="html">&lt;p&gt;There’s some mediawiki module out there which didn’t like the old colors, so let’s fix that&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Module rating|release}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
This module calculates the [[RadioGatún]][32] sum for a given string, returning it in a format suitable for showing a demonstration sum on a Wikipedia page.  [[RadioGatún]] is a cryptographic hash function from 2006 which remains, as of 2022, unbroken.  &lt;br /&gt;
&lt;br /&gt;
To use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:RadioGatun32|&amp;#039;&amp;#039;rg32&amp;#039;&amp;#039;|&amp;#039;&amp;#039;String to input&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or with the template (at [[Template:RadioGatun32]]):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;RadioGatun32|&amp;#039;&amp;#039;String to input&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there is &amp;lt;nowiki&amp;gt;{{Background color|#888|d}}&amp;lt;/nowiki&amp;gt; in the string to input, the calculated sum will be based on a string &amp;#039;&amp;#039;without&amp;#039;&amp;#039; the background color formatting.&lt;br /&gt;
&lt;br /&gt;
=== The rg32hash call ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to show the raw hexadecimal RadioGatun[32] sum of a given string without any formatting:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:RadioGatun32|rg32sum|&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;String to input&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, if we run:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:RadioGatun32|rg32sum|1234}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will get this:&lt;br /&gt;
&lt;br /&gt;
:{{#invoke:RadioGatun32|rg32sum|1234}}&lt;br /&gt;
&lt;br /&gt;
This should output &amp;quot;9EBDD24F469993796C4AAC6A821735A65A3CDEF8A359944CE71F34E7A08E1182&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:RadioGatun32|rg32|Hello, world&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will create this output:&lt;br /&gt;
&lt;br /&gt;
 RadioGatun[32](&amp;quot;Hello, world&amp;quot;) =&lt;br /&gt;
 D91BBD22BE5D01F091F26A16704CDA0E165588E025D9BA6619C5B01550756349&lt;br /&gt;
&lt;br /&gt;
Here is the computed output:&lt;br /&gt;
&lt;br /&gt;
{{#invoke:RadioGatun32|rg32|Hello, world}}&lt;br /&gt;
&lt;br /&gt;
We can have background colors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:RadioGatun32|rg32|&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;Background color|#ff8cc0|Li&amp;lt;nowiki&amp;gt;}}{{&amp;lt;/nowiki&amp;gt;Background color|#c08dff|fe&amp;lt;nowiki&amp;gt;}}!}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shows us this:&lt;br /&gt;
&lt;br /&gt;
{{#invoke:RadioGatun32|rg32|{{Background color|#ff8cc0|Li}}{{Background color|#c08dff|fe}}!}}&lt;br /&gt;
&lt;br /&gt;
The above should look exactly like this:&lt;br /&gt;
&lt;br /&gt;
 RadioGatun[32](&amp;quot;{{Background color|#ff8cc0|Li}}{{Background color|#c08dff|fe}}!&amp;quot;) =&lt;br /&gt;
 80E706E851DCDE1170452EEC6EAD24F40E63B9A07B86D8D32053A1237835E03D&lt;br /&gt;
&lt;br /&gt;
The computed sum will be for the string &amp;lt;code&amp;gt;Life!&amp;lt;/code&amp;gt;, as can be seen in the following:&lt;br /&gt;
&lt;br /&gt;
{{#invoke:RadioGatun32|rg32|Life!}}&lt;br /&gt;
&lt;br /&gt;
The above should look like this:&lt;br /&gt;
&lt;br /&gt;
 RadioGatun[32](&amp;quot;Life!&amp;quot;) =&lt;br /&gt;
 80E706E851DCDE1170452EEC6EAD24F40E63B9A07B86D8D32053A1237835E03D&lt;br /&gt;
&lt;br /&gt;
The background colors do not affect the computed RadioGatun[32] sum.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Testing inside Mediawiki ===&lt;br /&gt;
&lt;br /&gt;
To test this in Mediawiki, go to [[Module talk:RadioGatun32/testcases]], and verify that one sees &amp;quot;All RadioGatun[32] test vectors pass&amp;quot;.  One can rerun the test by going to [[Module:RadioGatun32/testcases]], clicking on &amp;quot;edit this page&amp;quot;, then in the debug console at the bottom, typing in &amp;lt;code&amp;gt;print(p.test())&amp;lt;/code&amp;gt;.  One should then see &amp;quot;All RadioGatun[32] test vectors pass&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another way to test this is to add &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:RadioGatun32/testcases|test}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to a page; wherever RadioGatun32/test is invoked, it should show &amp;quot;All RadioGatun[32] test vectors pass&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Testing outside Mediawiki ===&lt;br /&gt;
&lt;br /&gt;
This module can either be run as a Mediawiki Lua module, or as a standalone Lua script.  This very same script is also available on GitHub in a repo which includes automated tests to ensure implementations of RadioGatun[32] generate correct hashes against a number of test inputs, including all official RadioGatun[32] test vectors.&lt;br /&gt;
&lt;br /&gt;
To test this code, in a *NIX compatible environment like Linux, with Git and a version of Lua &amp;#039;&amp;#039;above&amp;#039;&amp;#039; 5.1 and &amp;#039;&amp;#039;below&amp;#039;&amp;#039; 5.4 (Lua 5.4 dropped &amp;lt;code&amp;gt;bit32&amp;lt;/code&amp;gt;; a Lua 5.1 implementation with &amp;lt;code&amp;gt;bit32&amp;lt;/code&amp;gt; support will also work), do the following:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/samboy/rg32hash&lt;br /&gt;
 cd rg32hash/sqa&lt;br /&gt;
 ./do.test.sh ../Lua/rg32wiki.sh&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Template:RadioGatun32]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Samboy</name></author>
	</entry>
</feed>