Reset the preshared key.
Note that if the preshared key is valid, it will be normalized (which may or may not modify the set value).
Note that the preshared-key is a secret and consequently has corresponding preshared-key-flags property. This is so that secrets can be optional and requested on demand from a secret-agent. Also, an invalid preshared-key may optionally cause is_valid to fail or it may be accepted.
It is a bug trying to modify a sealed WireGuardPeer instance.
this |
the unsealed WireGuardPeer instance |
preshared_key |
the new preshared key or null to clear the preshared key. |
accept_invalid |
whether to allow setting the key to an invalid value. If false, this is unchanged if the key is invalid and if false is returned. |
true if the preshared-key is valid, otherwise false.
null is considered a valid value. If the key is invalid, it depends on |