示例#1
0
文件: keys.go 项目: robmurtha/goq
func updateKeyDir(location string, km dkeyczar.KeyManager, encrypter dkeyczar.Encrypter) {

	s := km.ToJSONs(encrypter)

	ioutil.WriteFile(location+"/meta", []byte(s[0]), 0600)

	for i := 1; i < len(s); i++ {
		fname := location + "/" + strconv.Itoa(i)
		ioutil.WriteFile(fname, []byte(s[i]), 0600)
	}
}