Beispiel #1
0
func Nid2ShortName(nid NID) (string, error) {
	sn := C.OBJ_nid2sn(C.int(nid))
	if sn == nil {
		return "", fmt.Errorf("NID %d not found", nid)
	}
	return C.GoString(sn), nil
}
Beispiel #2
0
func (self *CipherCtx) name() string {
	name_p := C.OBJ_nid2sn(C.int(self.nid()))
	return C.GoString(name_p)
}
Beispiel #3
0
func getCurveName(curve *C.EC_GROUP) string {
	return C.GoString(C.OBJ_nid2sn(C.EC_GROUP_get_curve_name(curve)))
}
Beispiel #4
0
func (self *Digest) Name() string {
	return C.GoString(C.OBJ_nid2sn(C.int(self.Type())))
}
Beispiel #5
0
func CipherByNid(nid int) *Cipher {
	return newCipher(C.EVP_get_cipherbyname(C.OBJ_nid2sn(C.int(nid))))
}