<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.fundamental-ramen.com/index.php?action=history&amp;feed=atom&amp;title=Node%2FCrypto</id>
	<title>Node/Crypto - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.fundamental-ramen.com/index.php?action=history&amp;feed=atom&amp;title=Node%2FCrypto"/>
	<link rel="alternate" type="text/html" href="https://wiki.fundamental-ramen.com/index.php?title=Node/Crypto&amp;action=history"/>
	<updated>2026-04-28T05:25:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.11</generator>
	<entry>
		<id>https://wiki.fundamental-ramen.com/index.php?title=Node/Crypto&amp;diff=1479&amp;oldid=prev</id>
		<title>Tacoball: Created page with &quot;== HmacSHA256 with crypto &amp; crypto-js == &lt;source lang=&quot;js&quot;&gt; function myHashA(payload) {   const crypto = require(&quot;crypto&quot;);   const secret = &quot;0123456789abcdef&quot;;   const secret...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.fundamental-ramen.com/index.php?title=Node/Crypto&amp;diff=1479&amp;oldid=prev"/>
		<updated>2020-08-25T04:20:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== HmacSHA256 with crypto &amp;amp; crypto-js == &amp;lt;source lang=&amp;quot;js&amp;quot;&amp;gt; function myHashA(payload) {   const crypto = require(&amp;quot;crypto&amp;quot;);   const secret = &amp;quot;0123456789abcdef&amp;quot;;   const secret...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== HmacSHA256 with crypto &amp;amp; crypto-js ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;js&amp;quot;&amp;gt;&lt;br /&gt;
function myHashA(payload) {&lt;br /&gt;
  const crypto = require(&amp;quot;crypto&amp;quot;);&lt;br /&gt;
  const secret = &amp;quot;0123456789abcdef&amp;quot;;&lt;br /&gt;
  const secretBin = Buffer.from(secret, &amp;quot;hex&amp;quot;);&lt;br /&gt;
  return crypto.createHmac(&amp;quot;sha256&amp;quot;, secretBin)&lt;br /&gt;
    .update(JSON.stringify(payload))&lt;br /&gt;
    .digest()&lt;br /&gt;
    .toString(&amp;quot;hex&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function myHashB(payload) {&lt;br /&gt;
  const CryptoJS = require(&amp;quot;crypto-js&amp;quot;);&lt;br /&gt;
  const secret = &amp;quot;0123456789abcdef&amp;quot;;&lt;br /&gt;
  const secretBin = CryptoJS.enc.Hex.parse(secret);&lt;br /&gt;
  return CryptoJS.HmacSHA256(JSON.stringify(payload), secretBin)&lt;br /&gt;
    .toString(CryptoJS.enc.Hex);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
console.log(myHashA(&amp;quot;fuck&amp;quot;));&lt;br /&gt;
console.log(myHashB(&amp;quot;fuck&amp;quot;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tacoball</name></author>
	</entry>
</feed>