Improve parameter naming in `Whisper.DeleteKeyPair`
This commit is contained in:
parent
0cf24d2c3e
commit
ef87c330ce
|
@ -85,9 +85,9 @@ func (w *gethWhisperWrapper) AddKeyPair(key *ecdsa.PrivateKey) (string, error) {
|
|||
return w.whisper.AddKeyPair(key)
|
||||
}
|
||||
|
||||
// DeleteKeyPair deletes the specified key if it exists.
|
||||
func (w *gethWhisperWrapper) DeleteKeyPair(key string) bool {
|
||||
return w.whisper.DeleteKeyPair(key)
|
||||
// DeleteKeyPair deletes the key with the specified ID if it exists.
|
||||
func (w *gethWhisperWrapper) DeleteKeyPair(keyID string) bool {
|
||||
return w.whisper.DeleteKeyPair(keyID)
|
||||
}
|
||||
|
||||
func (w *gethWhisperWrapper) AddSymKeyDirect(key []byte) (string, error) {
|
||||
|
|
|
@ -164,10 +164,10 @@ func (w *nimbusWhisperWrapper) AddKeyPair(key *ecdsa.PrivateKey) (string, error)
|
|||
return retVal.(string), nil
|
||||
}
|
||||
|
||||
// DeleteKeyPair deletes the specified key if it exists.
|
||||
func (w *nimbusWhisperWrapper) DeleteKeyPair(key string) bool {
|
||||
// DeleteKeyPair deletes the key with the specified ID if it exists.
|
||||
func (w *nimbusWhisperWrapper) DeleteKeyPair(keyID string) bool {
|
||||
return w.routineQueue.Send(func(c chan<- interface{}) {
|
||||
keyC, err := decodeHexID(key)
|
||||
keyC, err := decodeHexID(keyID)
|
||||
if err != nil {
|
||||
c <- err
|
||||
return
|
||||
|
|
|
@ -51,8 +51,8 @@ type Whisper interface {
|
|||
|
||||
// AddKeyPair imports a asymmetric private key and returns a deterministic identifier.
|
||||
AddKeyPair(key *ecdsa.PrivateKey) (string, error)
|
||||
// DeleteKeyPair deletes the specified key if it exists.
|
||||
DeleteKeyPair(key string) bool
|
||||
// DeleteKeyPair deletes the key with the specified ID if it exists.
|
||||
DeleteKeyPair(keyID string) bool
|
||||
AddSymKeyDirect(key []byte) (string, error)
|
||||
AddSymKeyFromPassword(password string) (string, error)
|
||||
DeleteSymKey(id string) bool
|
||||
|
|
|
@ -85,9 +85,9 @@ func (w *gethWhisperWrapper) AddKeyPair(key *ecdsa.PrivateKey) (string, error) {
|
|||
return w.whisper.AddKeyPair(key)
|
||||
}
|
||||
|
||||
// DeleteKeyPair deletes the specified key if it exists.
|
||||
func (w *gethWhisperWrapper) DeleteKeyPair(key string) bool {
|
||||
return w.whisper.DeleteKeyPair(key)
|
||||
// DeleteKeyPair deletes the key with the specified ID if it exists.
|
||||
func (w *gethWhisperWrapper) DeleteKeyPair(keyID string) bool {
|
||||
return w.whisper.DeleteKeyPair(keyID)
|
||||
}
|
||||
|
||||
func (w *gethWhisperWrapper) AddSymKeyDirect(key []byte) (string, error) {
|
||||
|
|
|
@ -51,8 +51,8 @@ type Whisper interface {
|
|||
|
||||
// AddKeyPair imports a asymmetric private key and returns a deterministic identifier.
|
||||
AddKeyPair(key *ecdsa.PrivateKey) (string, error)
|
||||
// DeleteKeyPair deletes the specified key if it exists.
|
||||
DeleteKeyPair(key string) bool
|
||||
// DeleteKeyPair deletes the key with the specified ID if it exists.
|
||||
DeleteKeyPair(keyID string) bool
|
||||
AddSymKeyDirect(key []byte) (string, error)
|
||||
AddSymKeyFromPassword(password string) (string, error)
|
||||
DeleteSymKey(id string) bool
|
||||
|
|
|
@ -597,7 +597,7 @@ func (whisper *Whisper) NewKeyPair() (string, error) {
|
|||
return id, nil
|
||||
}
|
||||
|
||||
// DeleteKeyPair deletes the specified key if it exists.
|
||||
// DeleteKeyPair deletes the key with the specified ID if it exists.
|
||||
func (whisper *Whisper) DeleteKeyPair(key string) bool {
|
||||
deterministicID, err := toDeterministicID(key, keyIDSize)
|
||||
if err != nil {
|
||||
|
|
|
@ -597,7 +597,7 @@ func (whisper *Whisper) NewKeyPair() (string, error) {
|
|||
return id, nil
|
||||
}
|
||||
|
||||
// DeleteKeyPair deletes the specified key if it exists.
|
||||
// DeleteKeyPair deletes the key with the specified ID if it exists.
|
||||
func (whisper *Whisper) DeleteKeyPair(key string) bool {
|
||||
deterministicID, err := toDeterministicID(key, keyIDSize)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue