Esempio n. 1
0
// Save saves the public and secret key to filename and filename_secret
func (c *Cert) Save(filename string) error {
	rc := C.zcert_save(c.zcertT, C.CString(filename))
	if rc == C.int(-1) {
		return fmt.Errorf("SavePublic: error")
	}
	return nil
}
Esempio n. 2
0
// Save saves the public and secret key to filename and filename_secret
func (c *Cert) Save(filename string) error {
	cFilename := C.CString(filename)
	defer C.free(unsafe.Pointer(cFilename))

	rc := C.zcert_save(c.zcertT, cFilename)
	if rc == C.int(-1) {
		return fmt.Errorf("SavePublic: error")
	}
	return nil
}