privateKey property

String privateKey

The secret key used for event signing.

The value is an empty string if there is no secret key.

Implementation

String get privateKey => _privateKey;
void privateKey=(String key)

Sets the secret key used for signing events.

key must be a 32-byte hexadecimal string.

An ArgumentError is thrown if key is invalid.

Implementation

set privateKey(String key) {
  if (!keyIsValid(key)) {
    throw ArgumentError.value(key, 'key', 'Invalid key');
  } else {
    _publicKey = getPublicKey(key);
    _privateKey = key;
  }
}