func LoadKeyFromFile(file string, format KeyDataFormat) (*Key, error) { ptr, err := clib.XMLSecCryptoAppKeyLoad(file, clib.KeyDataFormat(format)) if err != nil { return nil, err } return &Key{ptr: ptr}, nil }
func LoadKeyFromBytes(data []byte, format KeyDataFormat) (*Key, error) { ptr, err := clib.XMLSecCryptoAppKeyLoadMemory(data, clib.KeyDataFormat(format)) if err != nil { return nil, err } return &Key{ptr: ptr}, nil }
func (k *Key) LoadCertFromFile(fn string, format KeyDataFormat) error { return clib.XMLSecCryptoAppKeyCertLoad(k, fn, clib.KeyDataFormat(format)) }
func (km *KeyManager) LoadCert(buf []byte, format KeyDataFormat, typ KeyDataType) error { return clib.XMLSecKeysMngrCertLoadMemory(km, buf, clib.KeyDataFormat(format), clib.KeyDataType(typ)) }