"Sputnik" help  
Sputnik Help
BinarySha3(<binary>, [<security>], [<key>])

Description

Calculates the SHA-3 hash of a binary string.

Parameters

<binary> The binary string for which the SHA-3 hash is to be calculated.
<security> Optional security level of the SHA-3 algorithm to use. The default value is 512. Valid options are: 224, 256, 384, 512
<key> Optional cryptographic key used for key transformation in the SHA-3 algorithm. The default value is a cryptographically secure 64-bit random number.

Return Value

Success: Returns the SHA-3 hash of the input binary string as a binary string.
Failure: Returns empty string.

Remarks

The BinarySha3 function computes the SHA-3 hash of a binary string using the specified security level and key. SHA-3 is a cryptographic hash function that produces a fixed-size hash value for a given input. The security level determines the output hash size, with the default being 512 bits. The key parameter is an optional input that can enhance the security of the hash function based on specific cryptographic requirements.

Related

BinaryMd5, BinarySha1, BinarySha256, BinarySha384, BinarySha512

Example

Example of usage:

my $bin = (Binary)"Hello World!";
say Sha3("Hello World!");
say Sha3("Hello World!", 256);
say Sha3("Hello World!", 512);
say Sha3("Hello World!", 512, "quick");
say Sha3("Hello World!", 512, "fox");
say Sha3("Hello World!", 512, "fox");
// PRINTS
// 89fbc09ee5582581cc7033034952197828f90a43191dd4122e17e072265dc32451c85c3ff6a7ea2e03763804d29b8f5b1812bff655f81c725ea15f06b65b65aa
// ed554fc2f667c066ec0a79cbfb2e915e70e60e880fd646647ffe908c273b7b70
// e3245407580e08a46f8f43c5fb14e10966787d915247a7269f3472b855dcce9b2194b10a0c5c6d485add02b1cea712b3d75374110cf85faa138345614864219a
// 3f815664fe4bfed59c3732913931fcca88b1273956b7b595fc5a7f07f01479e75db13a428d152958c00fc4e365b4d8d7ea0cf9c6291a64e88661d6332d6ccb1e
// f5288af9b09414cde7aa04c73173899ca7a987d510902910e0aa73baca088dbc890a921d02270e67997f6b6fc07f7f071c76ba7d6ca42813abeafc532951782b
// f5288af9b09414cde7aa04c73173899ca7a987d510902910e0aa73baca088dbc890a921d02270e67997f6b6fc07f7f071c76ba7d6ca42813abeafc532951782b

 


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org