<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Support decrypting packets for display]]></title><description><![CDATA[<p dir="auto">Is there a crypto package which can be used to decrypt packets for display?</p>
<p dir="auto">In particular I'm interested in the GCM format.</p>
<p dir="auto">Thanks.</p>
]]></description><link>http://64.23.185.212/forum/topic/209/support-decrypting-packets-for-display</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Nov 2026 08:17:26 GMT</lastBuildDate><atom:link href="http://64.23.185.212/forum/topic/209.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 Oct 2023 00:57:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Support decrypting packets for display on Thu, 12 Oct 2023 02:21:42 GMT]]></title><description><![CDATA[<p dir="auto">There's no ready-to-use crypto package with GCM support.</p>
<p dir="auto">However, Jancy (the scripting language of IO Ninja) has high compatibility with C, so you can use (or create) a shared helper library (<code>.so/.dll/.dylib</code>), then call it directly from IO Ninja scripts.</p>
<p dir="auto">For example, here's how to call OpenSSL for calculation of MD5:</p>
<pre><code>dynamiclib Libcrypto {
	void thin* MD5(
		void thin const* p,
		size_t size,
		void thin* buffer // 16 bytes
	);

	int OPENSSL_buf2hexstr_ex(
		void thin* buffer,
		size_t bufferSize,
		size_t thin* actualSize,
		void thin const* data,
		long dataSize,
		char separator = 0
	);
}

void main() {
	Libcrypto libcrypto;
	libcrypto.open("libcrypto.so");

	char text[] = "abc";
	char md5[16];
	char hex[64];
	libcrypto.lib.MD5(text, sizeof(text) - 1, md5); // -1 for null-terminator
	libcrypto.lib.OPENSSL_buf2hexstr_ex(hex, sizeof(hex), null, md5, sizeof(md5));
	g_logWriter.write($"md5(%s) -&gt; %s\n"(text, hex));
}
</code></pre>
]]></description><link>http://64.23.185.212/forum/post/534</link><guid isPermaLink="true">http://64.23.185.212/forum/post/534</guid><dc:creator><![CDATA[Vladimir]]></dc:creator><pubDate>Thu, 12 Oct 2023 02:21:42 GMT</pubDate></item></channel></rss>