From WikiChip
Editing mirc/identifiers/$sha384

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 19: Line 19:
 
== Example ==
 
== Example ==
 
Echo the SHA384 hash of plain text string ''abc'' to the active window:
 
Echo the SHA384 hash of plain text string ''abc'' to the active window:
<source lang="mIRC">//echo -a $sha384(abc)</source>
+
<pre>//echo -a $sha384(abc)
 
or
 
or
<source lang="mIRC">//echo -a $sha384(abc,0)</source>
+
//echo -a $sha384(abc,0)</pre>
 
The DATA is case-sensitive, so hash of "abc" is different than hash of "ABC"
 
The DATA is case-sensitive, so hash of "abc" is different than hash of "ABC"
  
 
Echo the SHA384 hash of the zero-length null string to the active window:
 
Echo the SHA384 hash of the zero-length null string to the active window:
<source lang="mIRC">//echo -a $sha384($null)</source>
+
<pre>//echo -a $sha384($null)</pre>
  
 
Echo the SHA384 hash of the first 1000 bytes of the mIRC program you're running to the active window:
 
Echo the SHA384 hash of the first 1000 bytes of the mIRC program you're running to the active window:
<source lang="mIRC">//bread $qt($mircexe) 0 1000 &snip | echo -a $sha384(&snip,1)</source>
+
<pre>//bread $qt($mircexe) 0 1000 &snip | echo -a $sha384(&snip,1)</pre>
  
 
Echo the SHA384 hash of the contents of the entire mIRC program you're running to the active window:
 
Echo the SHA384 hash of the contents of the entire mIRC program you're running to the active window:
<source lang="mIRC">//echo -a $sha384($mircexe,2)</source>
+
<pre>//echo -a $sha384($mircexe,2)</pre>
  
 
Note that because the default is N=0, '''$sha384($mircexe)''' is the SHA384 hash for the plaintext text string of the drive:\path\filename for the mIRC you're running, and not the hash of the filename contents. This differs from $crc($mircexe) giving the checksum of the filename contents because $crc has default of N=2.<br />
 
Note that because the default is N=0, '''$sha384($mircexe)''' is the SHA384 hash for the plaintext text string of the drive:\path\filename for the mIRC you're running, and not the hash of the filename contents. This differs from $crc($mircexe) giving the checksum of the filename contents because $crc has default of N=2.<br />
 
mIRC v7.x Unicode-encodes bytes 128-255 to utf8 before providing to $sha384, if the text doesn't have code points above 255, you can avoid the utf8 encoding issue by using /bset to create a binvar with the -a switch.
 
mIRC v7.x Unicode-encodes bytes 128-255 to utf8 before providing to $sha384, if the text doesn't have code points above 255, you can avoid the utf8 encoding issue by using /bset to create a binvar with the -a switch.
  
<source lang="mIRC">//var %a chloé | bset -t &bin1 1 %a | bset -ta &bin2 1 %a | echo -a $sha1(&bin1,1) vs $sha1(&bin2,1) or $bvar(&bin1,1-) vs $bvar(&bin2,1-)</source>
+
<pre>//var %a chloé | bset -t &bin1 1 %a | bset -ta &bin2 1 %a | echo -a $sha1(&bin1,1) vs $sha1(&bin2,1) or $bvar(&bin1,1-) vs $bvar(&bin2,1-)</pre>
  
 
== Error Messages ==
 
== Error Messages ==

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)