messages.getDhConfig
Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length.
func (c *Client) MessagesGetDhConfig(ctx context.Context, request *MessagesGetDhConfigRequest) (MessagesDhConfigClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesGetDhConfig(ctx, &tg.MessagesGetDhConfigRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // MessagesDhConfigClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Version | int | yes | Value of the version parameter from messages.dhConfig, available at the client |
RandomLength | int | yes | Length of the required random sequence |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | RANDOM_LENGTH_INVALID | Random length invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.getDhConfig#26cf8950