Пример #1
0
func setEncrypted(key, keyring string, d []byte, store backend.Store, keySelector pubkeyFilter) error {
	kr, err := os.Open(keyring)
	if err != nil {
		return err
	}
	defer kr.Close()
	secureValue, err := secconf.EncodeWith(d, kr, keySelector)
	if err != nil {
		return err
	}
	err = store.Set(key, secureValue)
	return err
}
Пример #2
0
func setPlain(key string, store backend.Store, d []byte) error {
	err := store.Set(key, d)
	return err

}