mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 07:50:25 +08:00
17 lines
293 B
Go
17 lines
293 B
Go
|
|
package api
|
||
|
|
|
||
|
|
import (
|
||
|
|
"mayfly-go/pkg/biz"
|
||
|
|
"mayfly-go/pkg/ctx"
|
||
|
|
"mayfly-go/pkg/utils"
|
||
|
|
)
|
||
|
|
|
||
|
|
type Common struct {
|
||
|
|
}
|
||
|
|
|
||
|
|
func (i *Common) RasPublicKey(rc *ctx.ReqCtx) {
|
||
|
|
publicKeyStr, err := utils.GetRsaPublicKey()
|
||
|
|
biz.ErrIsNilAppendErr(err, "rsa生成公私钥失败")
|
||
|
|
rc.ResData = publicKeyStr
|
||
|
|
}
|