# LinkUtils

## Summary

| Members                                                                                                                                                                                   | Descriptions                                                                                             |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `public static byte[]` [`AbiEncode`](#class_anchor_link_sharp_1_1_link_utils_1adab3b9354609878652e652f1f9fc620a)`(object value, string typeName)`                                         |                                                                                                          |
| `public static TResultType` [`AbiDecode< TResultType >`](#class_anchor_link_sharp_1_1_link_utils_1a5952626941960f110b92a0a3438bae3b)`(byte[] bytes, string typeName, TResultType result)` | Helper to ABI decode data.                                                                               |
| `public static byte[]` [`SealMessage`](#class_anchor_link_sharp_1_1_link_utils_1a538ddc29affee1a165387aab12338828)`(string message, string privateKey, string publicKey)`                 | Encrypt a message using AES and shared secret derived from given keys.                                   |
| `public static string` [`NormalizePublicKey`](#class_anchor_link_sharp_1_1_link_utils_1af14e57b1b17d5e8c8bd1a14316c8356f)`(string key)`                                                   | Ensure public key is in new PUB\_ format.                                                                |
| `public static bool` [`PublicKeyEqual`](#class_anchor_link_sharp_1_1_link_utils_1aee35594576cbcd989a3885af2d8f6afb)`(string keyA, string keyB)`                                           | Return true if given public keys are equal.                                                              |
| `public static string` [`GeneratePrivateKey`](#class_anchor_link_sharp_1_1_link_utils_1a5b46dbec4572c7e31e33244880b89991)`()`                                                             | Generate a random private key. Uses browser crypto if available, otherwise falls back to slow eosjs-ecc. |

## Members

**`public static byte[]`** [**`AbiEncode`**](#class_anchor_link_sharp_1_1_link_utils_1adab3b9354609878652e652f1f9fc620a)**`(object value, string typeName)`**

**`public static TResultType`** [**`AbiDecode< TResultType >`**](#class_anchor_link_sharp_1_1_link_utils_1a5952626941960f110b92a0a3438bae3b)**`(byte[] bytes, string typeName, TResultType result)`**

Helper to ABI decode data.

**`public static byte[]`** [**`SealMessage`**](#class_anchor_link_sharp_1_1_link_utils_1a538ddc29affee1a165387aab12338828)**`(string message, string privateKey, string publicKey)`**

Encrypt a message using AES and shared secret derived from given keys.

**`public static string`** [**`NormalizePublicKey`**](#class_anchor_link_sharp_1_1_link_utils_1af14e57b1b17d5e8c8bd1a14316c8356f)**`(string key)`**

Ensure public key is in new PUB\_ format.

**`public static bool`** [**`PublicKeyEqual`**](#class_anchor_link_sharp_1_1_link_utils_1aee35594576cbcd989a3885af2d8f6afb)**`(string keyA, string keyB)`**

Return true if given public keys are equal.

**`public static string`** [**`GeneratePrivateKey`**](#class_anchor_link_sharp_1_1_link_utils_1a5b46dbec4572c7e31e33244880b89991)**`()`**

Generate a random private key. Uses browser crypto if available, otherwise falls back to slow eosjs-ecc.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://liquiidio.gitbook.io/unity-plugin-suite/anchorlink/api-docs/anchorlinksharp/anchorlinksharp-linkutils.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
