MCPcopy Create free account
hub / github.com/NoFxAiOS/nofx / isValidPrivateKey

Function isValidPrivateKey

api/crypto_handler.go:73–80  ·  view source on GitHub ↗

==================== Encrypted Data Decryption ==================== SECURITY: there is deliberately NO public decrypt endpoint. Transport encryption is one-directional — clients encrypt sensitive fields to the server's RSA public key and the authenticated config-update handlers (handleUpdateModelCo

(key string)

Source from the content-addressed store, hash-verified

71
72// isValidPrivateKey Validate private key format
73func isValidPrivateKey(key string) bool {
74 // EVM private key: 64 hex characters (optional 0x prefix)
75 if len(key) == 64 || (len(key) == 66 && key[:2] == "0x") {
76 return true
77 }
78 // TODO: Add validation for other chains
79 return false
80}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected