Fix EncryptWithPassphrase to accept LockedBuffer for data parameter
- Changed EncryptWithPassphrase to accept *memguard.LockedBuffer instead of []byte - Updated all callers to pass LockedBuffer: - CreatePassphraseUnlocker in vault/unlockers.go - Keychain unlocker in keychainunlocker.go - Tests in passphrase_test.go - Removed intermediate dataBuffer creation since data is now already protected - This ensures sensitive data is protected in memory throughout encryption
This commit is contained in:
@@ -62,7 +62,6 @@ func NewSecret(vault VaultInterface, name string) *Secret {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// GetValue retrieves and decrypts the current version's value using the provided unlocker
|
||||
func (s *Secret) GetValue(unlocker Unlocker) ([]byte, error) {
|
||||
DebugWith("Getting secret value",
|
||||
|
||||
Reference in New Issue
Block a user