GetPrimaryKey returns the key on the ring at position 0. This is the key used for encrypting messages, and is the first key tried for decrypting messages.
()
| 153 | // GetPrimaryKey returns the key on the ring at position 0. This is the key used |
| 154 | // for encrypting messages, and is the first key tried for decrypting messages. |
| 155 | func (k *Keyring) GetPrimaryKey() (key []byte) { |
| 156 | k.l.Lock() |
| 157 | defer k.l.Unlock() |
| 158 | |
| 159 | if len(k.keys) > 0 { |
| 160 | key = k.keys[0] |
| 161 | } |
| 162 | return |
| 163 | } |
no outgoing calls