{"modulePath":"github.com/utmstack/UTMStack/plugins/shared","version":"v0.0.0-20261126134315-738f65073a40","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package crypto\n\nPackage crypto provides symmetric encryption for payloads crossing NATS.\n\n## Types\n\n```go\ntype Cipher struct {\n\t// contains filtered or unexported fields\n}\n```\nDerives both the AES-128-CBC key and its IV from one key string via PBKDF2. This derivation must not change: it is the already-deployed scheme, so any change makes existing ciphertext unreadable.\n\n```go\nfunc NewCipher(key string) *Cipher\n```\n\n```go\nfunc (c *Cipher) Decrypt(crypt string) (string, error)\n```\nReturns already-plaintext input unchanged rather than erroring, so values written before a key was configured stay readable.\n\n```go\nfunc (c *Cipher) Encrypt(plain string) (string, error)\n```\n\n","path":"github.com/utmstack/UTMStack/plugins/shared/crypto","name":"crypto","synopsis":"Package crypto provides symmetric encryption for payloads crossing NATS.","isRedistributable":true}
