コード例 #1
0
func setEncrypted(key, keyring string, d []byte, store backend.Store) error {
	kr, err := os.Open(keyring)
	if err != nil {
		return err
	}
	defer kr.Close()
	secureValue, err := secconf.Encode(d, kr)
	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

}