Skip to main content
Glama
hasher.go650 B
package obfuscation import ( "crypto/md5" "encoding/hex" ) type Hasher interface { HashBytes(raw []byte) string } type MD5Hasher struct{} func (hasher MD5Hasher) HashBytes(raw []byte) string { // deepcode ignore InsecureHash: <This hash is not for any password> hash := md5.Sum(raw) return hex.EncodeToString(hash[:]) } type FixedHasher struct { Value string } // The simplest, lossy hasher, used in tests func (hasher FixedHasher) HashBytes(_ []byte) string { return hasher.Value } // Hasher which returns the input as-is type IdentityHasher struct{} func (hasher IdentityHasher) HashBytes(raw []byte) string { return string(raw) }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TheLunarCompany/lunar'

If you have feedback or need assistance with the MCP directory API, please join our Discord server