whisper/shhclient: update call to shh_generateSymKeyFromPassword to pass a string

This commit is contained in:
Andrea Franz 2018-05-03 14:43:34 +02:00
parent fd3da7c69d
commit 97d0fcdc30
No known key found for this signature in database
GPG key ID: 4F0D2F2D9DE7F29D

View file

@ -135,9 +135,9 @@ func (sc *Client) AddSymmetricKey(ctx context.Context, key []byte) (string, erro
} }
// GenerateSymmetricKeyFromPassword generates the key from password, stores it, and returns its identifier. // GenerateSymmetricKeyFromPassword generates the key from password, stores it, and returns its identifier.
func (sc *Client) GenerateSymmetricKeyFromPassword(ctx context.Context, passwd []byte) (string, error) { func (sc *Client) GenerateSymmetricKeyFromPassword(ctx context.Context, passwd string) (string, error) {
var id string var id string
return id, sc.c.CallContext(ctx, &id, "shh_generateSymKeyFromPassword", hexutil.Bytes(passwd)) return id, sc.c.CallContext(ctx, &id, "shh_generateSymKeyFromPassword", passwd)
} }
// HasSymmetricKey returns an indication if the key associated with the given id is stored in the node. // HasSymmetricKey returns an indication if the key associated with the given id is stored in the node.