toMap method

Map<String, Object?> toMap()

Implementation

Map<String, Object?> toMap() {
  _ensureLazyLoaded();

  final map = <String, Object?>{};
  if (_challenge != null) {
    map['challenge'] = _challenge;
  }
  if (_salt != null) {
    map['salt'] = _salt;
  }
  if (_keyLen != null) {
    map['keylen'] = _keyLen;
  }
  if (_channelBinding != null) {
    map['channel_binding'] = _channelBinding;
  }
  if (_iterations != null) {
    map['iterations'] = _iterations;
  }
  if (_memory != null) {
    map['memory'] = _memory;
  }
  if (_kdf != null) {
    map['kdf'] = _kdf;
  }
  if (_nonce != null) {
    map['nonce'] = _nonce;
  }
  for (final entry in custom.entries) {
    map.putIfAbsent(entry.key, () => entry.value);
  }
  return map;
}