Table of Contents

Class EncodingCryptoTools

Namespace
JD.AI.Core.Tools
Assembly
JD.AI.Core.dll

Encoding, decoding, hashing, and cryptographic utility tools for common developer operations.

[ToolPlugin("encoding")]
public sealed class EncodingCryptoTools
Inheritance
EncodingCryptoTools
Inherited Members

Methods

ComputeHash(string, string)

[KernelFunction("hash_compute")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static string ComputeHash(string text, string algorithm = "sha256")

Parameters

text string
algorithm string

Returns

string

DecodeBase64(string)

[KernelFunction("decode_base64")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static string DecodeBase64(string encoded)

Parameters

encoded string

Returns

string

DecodeJwt(string)

[KernelFunction("decode_jwt")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static string DecodeJwt(string token)

Parameters

token string

Returns

string

DecodeUrl(string)

[KernelFunction("decode_url")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
[SuppressMessage("Design", "CA1055:URI-like return values should not be strings", Justification = "Returns markdown-formatted text, not a URI")]
public static string DecodeUrl(string encoded)

Parameters

encoded string

Returns

string

EncodeBase64(string, bool)

[KernelFunction("encode_base64")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static string EncodeBase64(string text, bool urlSafe = false)

Parameters

text string
urlSafe bool

Returns

string

EncodeUrl(string)

[KernelFunction("encode_url")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
[SuppressMessage("Design", "CA1055:URI-like return values should not be strings", Justification = "Returns markdown-formatted text, not a URI")]
public static string EncodeUrl(string text)

Parameters

text string

Returns

string

GenerateGuid(int)

[KernelFunction("generate_guid")]
[ToolSafetyTier(SafetyTier.AutoApprove)]
public static string GenerateGuid(int count = 1)

Parameters

count int

Returns

string