mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 16:30: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
							 | 
						||
| 
								 | 
							
								}
							 |