befuddle 0.1.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

befuddle

Obfuscate JSON.

Disclaimer: This is not an official Google or Dart project.

Usage

Befuddle is a simple application and library that is meant to replace representative sets of JSON data (i.e. from a real backend server) with another like-set of data. Befuddle does the following by default:

  • Replaces numbers with similar (random) numbers.
  • Replaces booleans with a random true or false value.
  • Replaces strings with similar (random) strings.
  • Replaces arrays with similar lists, with elements replaced recursively.

For maps (objects), values are replaced recursively similar to the rules above.

However, for keys (properties), it is guaranteed that the randomly generated string is stable for the entire document:

$ befuddle '[{"name": "A"}, {"name": "B"}, {"name": "C"}]'
> [{"0wUc":"u"},{"0wUc":"y"},{"0wUc":"o"}]

This means you could tweak an existing reader/parser to look for 0wUc instead of name, for example.

In future versions of befuddle, it may be possible to emit a symbol map to help with tooling.

From Pub

If you're a Dart user, you can install befuddle globally:

$ pub global activate befuddle
$ befuddle '[{"name": "A"}, {"name": "B"}]'

Or add it to your pubspec:

dependencies:
  befuddle: ^0.1.0

... and use it programatically:

import 'package:befuddle/befuddle.dart';

void main(List<String> args) {
  print(befuddle(args.first));
}

0.1.0

  • Initial commit.

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate befuddle

2. Use it

The package has the following executables:


$ befuddle

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  befuddle: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:befuddle/befuddle.dart';
  
Version Uploaded Documentation Archive
0.1.0 Oct 21, 2017 Go to the documentation of befuddle 0.1.0 Download befuddle 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.22.0 <2.0.0