harness-drone/store/shared/encrypt/none.go

20 lines
529 B
Go
Raw Normal View History

2019-02-19 23:56:41 +00:00
// Copyright 2019 Drone.IO Inc. All rights reserved.
// Use of this source code is governed by the Drone Non-Commercial License
// that can be found in the LICENSE file.
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
}