github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/engine/rpc_exim.go (about)

     1  // Copyright 2015 Keybase, Inc. All rights reserved. Use of
     2  // this source code is governed by the included BSD license.
     3  
     4  package engine
     5  
     6  import (
     7  	"github.com/keybase/client/go/libkb"
     8  	keybase1 "github.com/keybase/client/go/protocol/keybase1"
     9  )
    10  
    11  func (a *PGPKeyImportEngineArg) Export() (ret keybase1.PGPKeyGenArg) {
    12  	ret.AllowMulti = a.AllowMulti
    13  	ret.DoExport = a.DoExport
    14  	ret.ExportEncrypted = a.ExportEncrypted
    15  	ret.PushSecret = a.PushSecret
    16  	a.Gen.ExportTo(&ret)
    17  	return
    18  }
    19  
    20  func ImportPGPKeyImportEngineArg(a keybase1.PGPKeyGenArg) (ret PGPKeyImportEngineArg) {
    21  	ga := libkb.ImportKeyGenArg(a)
    22  	ret = PGPKeyImportEngineArg{
    23  		AllowMulti:      a.AllowMulti,
    24  		DoExport:        a.DoExport,
    25  		ExportEncrypted: a.ExportEncrypted,
    26  		PushSecret:      a.PushSecret,
    27  		Gen:             &ga,
    28  	}
    29  	return ret
    30  }