(privateKey *PrivateKey)
| 45 | } |
| 46 | |
| 47 | func (ks *KeyStore) AddKey(privateKey *PrivateKey) { |
| 48 | keyPair := NewKeyPair(privateKey) |
| 49 | |
| 50 | ks.Lock() |
| 51 | defer ks.Unlock() |
| 52 | |
| 53 | ks.keys[keyPair.GetKeyID()] = keyPair |
| 54 | } |
| 55 | |
| 56 | func (ks *KeyStore) GetKeyPair(pubKeyHash []byte) *KeyPair { |
| 57 | ks.RLock() |