Documentation
¶
Overview ¶
Package crypto provides field-level encryption for Geode node and edge properties. It uses AES-256-GCM for authenticated encryption with HKDF-SHA256 for key derivation and HMAC-SHA256 for deterministic searchable encryption.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
Cipher holds derived encryption and HMAC keys for field-level encryption.
func NewCipher ¶
NewCipher creates a new Cipher from the given master key. masterKey must be at least 32 bytes.
func (*Cipher) Decrypt ¶
Decrypt decrypts a ciphertext produced by Encrypt. Returns an error if the input is too short or authentication fails.
func (*Cipher) DecryptString ¶
DecryptString base64-decodes the input and decrypts it, returning the original string.
func (*Cipher) Encrypt ¶
Encrypt encrypts plaintext using AES-256-GCM with a random nonce. The returned ciphertext has the nonce prepended.
func (*Cipher) EncryptString ¶
EncryptString encrypts the plaintext string and returns a base64-encoded result.