(location string)
| 9 | ) |
| 10 | |
| 11 | func LoadRSAPrivateKeyFromDisk(location string) *rsa.PrivateKey { |
| 12 | keyData, e := os.ReadFile(location) |
| 13 | if e != nil { |
| 14 | panic(e.Error()) |
| 15 | } |
| 16 | key, e := jwt.ParseRSAPrivateKeyFromPEM(keyData) |
| 17 | if e != nil { |
| 18 | panic(e.Error()) |
| 19 | } |
| 20 | return key |
| 21 | } |
| 22 | |
| 23 | func LoadRSAPublicKeyFromDisk(location string) *rsa.PublicKey { |
| 24 | keyData, e := os.ReadFile(location) |