(id string)
| 107 | } |
| 108 | |
| 109 | func (m *MemKeyPairStorage) GetKeyFromID(id string) (*KeyPair, error) { |
| 110 | v, err := m.id.Get(id) |
| 111 | if err != nil { |
| 112 | return nil, err |
| 113 | } |
| 114 | |
| 115 | keyPair, ok := v.(*KeyPair) |
| 116 | if !ok { |
| 117 | return nil, fmt.Errorf("MemKeyPairStorage: GetKeyFromID value is malformed %+v", v) |
| 118 | } |
| 119 | |
| 120 | return keyPair, nil |
| 121 | } |
| 122 | |
| 123 | func (m *MemKeyPairStorage) GetKeyFromPublic(public string) (*KeyPair, error) { |
| 124 | v, err := m.public.Get(public) |