func (m *gpgmeSigningMechanism) importKeysFromBytes(blob []byte) ([]string, error) {
	inputData, err := gpgme.NewDataBytes(blob)
	if err != nil {
		return nil, err
	}
	res, err := m.ctx.Import(inputData)
	if err != nil {
		return nil, err
	}
	keyIdentities := []string{}
	for _, i := range res.Imports {
		if i.Result == nil {
			keyIdentities = append(keyIdentities, i.Fingerprint)
		}
	}
	return keyIdentities, nil
}
func (m *gpgmeSigningMechanism) importKeysFromBytes(blob []byte) ([]string, error) {
	inputData, err := gpgme.NewDataBytes(blob)
	if err != nil {
		return nil, err
	}
	res, err := m.ctx.Import(inputData)
	if err != nil {
		return nil, err
	}
	keyIdentities := []string{}
	for _, i := range res.Imports {
		if i.Result == nil {
			keyIdentities = append(keyIdentities, i.Fingerprint)
		}
	}
	return keyIdentities, nil
}
func ( m * gpgmeSigningMechanism ) importKeysFromBytes ( blob [ ] byte ) ( [ ] string , error ) { inputData , err := gpgme . NewDataBytes ( blob ) if err != nil { return nil , err } res , err := m . ctx . Import ( inputData ) if err != nil { return nil , err } keyIdentities := [ ] string { } for _ , i := range res . Imports { if i . Result == nil { keyIdentities = append ( keyIdentities , i . Fingerprint ) } } return keyIdentities , nil }
// importKeysFromBytes imports public keys from the supplied blob and returns their identities.
// The blob is assumed to have an appropriate format (the caller is expected to know which one).
// NOTE: This may modify long-term state (e.g. key storage in a directory underlying the mechanism);
// but we do not make this public, it can only be used through newEphemeralGPGSigningMechanism.
importKeysFromBytes imports public keys from the supplied blob and returns their identities . The blob is assumed to have an appropriate format ( the caller is expected to know which one ) . NOTE : This may modify long - term state ( e . g . key storage in a directory underlying the mechanism ) ; but we do not make this public it can only be used through newEphemeralGPGSigningMechanism .