drone/encrypt/none.go

20 lines
550 B
Go

// Copyright 2023 Harness Inc. All rights reserved.
// Use of this source code is governed by the Polyform Free Trial License
// that can be found in the LICENSE.md file for this repository.
package encrypt
// none is an encryption strategy that stores secret
// values in plain text. This is the default strategy
// when no key is specified.
type none struct {
}
func (*none) Encrypt(plaintext string) ([]byte, error) {
return []byte(plaintext), nil
}
func (*none) Decrypt(ciphertext []byte) (string, error) {
return string(ciphertext), nil
}