mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 17:10:28 +00:00
33 lines
533 B
Go
33 lines
533 B
Go
// +build noawskms nogcpkms novaultkms
|
|
|
|
package kms
|
|
|
|
const disabledProviderName = "Disabled"
|
|
|
|
type disabledSecret struct {
|
|
baseSecret
|
|
err error
|
|
}
|
|
|
|
func newDisabledSecret(err error) SecretProvider {
|
|
return &disabledSecret{
|
|
baseSecret: baseSecret{},
|
|
err: err,
|
|
}
|
|
}
|
|
|
|
func (s *disabledSecret) Name() string {
|
|
return disabledProviderName
|
|
}
|
|
|
|
func (s *disabledSecret) IsEncrypted() bool {
|
|
return false
|
|
}
|
|
|
|
func (s *disabledSecret) Encrypt() error {
|
|
return s.err
|
|
}
|
|
|
|
func (s *disabledSecret) Decrypt() error {
|
|
return s.err
|
|
}
|