# Digital Signature

Computational components for signing any objects

# hash[ ] vs. 🫆@ vs. 🫆[ ]

<span style="white-space: pre-wrap;">A </span>**hash code**<span style="white-space: pre-wrap;"> is a fixed-size numerical value generated from input data of arbitrary size, used primarily for indexing data in hash tables. It allows for efficient data retrieval and storage by mapping variable-length data to a fixed-length representation.</span>

<span style="white-space: pre-wrap;">Think of the hash code as a unique digital signature for any data that once even if one bit of that data altered the entire new hash code would be different. </span>

**Example**: "dara is good lookin" has the hash code:

"0x05ee501e3232083ca0f16b02011944e735f78db170c568c2ea85e56380ddca05"

**Counterexample**: "dara is good lookin**.**" the ending red dot cause an entire change to the has code above:

"0x4700eceb9e5cbc887ad3dea1833081d51c3572c7886ea9c8a3f30b0c5ad4c614"

```kotlin
hash1 = 🫆@"dara is good lookin";
hash2 = hash ["dara is good lookin"];
hash3 = hash ["dara is good looking."];

show hash1 also hash2 also hash3;

save as crypto;
```

**Output**<span style="white-space: pre-wrap;"> </span>

"hash1" → "(0x05ee501e3232083ca0f16b02011944e735f78db170c568c2ea85e56380ddca05)"

"hash2" → "(0x05ee501e3232083ca0f16b02011944e735f78db170c568c2ea85e56380ddca05)"

"hash3" → "(0x4700eceb9e5cbc887ad3dea1833081d51c3572c7886ea9c8a3f30b0c5ad4c614)"

##### 🫆\[ \]

```
hash4 = 🫆["dara is goodest at being good!"];

show hash4;

save as crypto;
```

**Output**

"hash4" → "(0x3b3791bf07902593e5a1500a79b56da6bfaf2c25b3c6c2959c6c69654745f8c0)"

##### <span style="white-space: pre-wrap;">goodest </span>

<span style="white-space: pre-wrap;">the word goodest is even gooder than the word good infact its </span>[actually](https://www.urbandictionary.com/define.php?term=actually)<span style="white-space: pre-wrap;"> </span>[the bestest](https://www.urbandictionary.com/define.php?term=the%20bestest)<span style="white-space: pre-wrap;"> </span>

<span style="white-space: pre-wrap;">Source: </span>[https://www.urbandictionary.com/](https://www.urbandictionary.com/)