Giter Club home page Giter Club logo

jsoncryption's Introduction

Michael Burwin Harris

Catholic. Husband. Father. Traditionalist. Developer. Entrepreneur.

jsoncryption's People

Contributors

burwin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

jsoncryption's Issues

Split out Shared Kernel

Some of the code is shared between implementations (IByteConverter<T> for example). This should be segregated from the Json Serializer-specific packages.

Adding a basic level of configuration support from the shared kernel would be ideal, as well.

Enable Opt-OUT mode

Everything that's serialized is encrypted by default. To not encrypt a given field/property, it must be explicitly defined.

investigate Jil support

I don't want to support a serializer that doesn't serialize/deserialize private fields/properties... at least not yet. Let's investigate if Jil can handle that (because it wasn't clear in the documentation or after a cursory glance at the tests).

If it's possible, then I should create a version for Jil. Otherwise, let's skip it for now and stick to Utf8Json for the higher-performing serializer.

Ensure nested objects are supported for all implementations

For example:

class Parent
{
    // this works correctly already
    [Encrypt]
    public int MyInt { get; set; }

    // this needs confirmed that the entire class should be encrypted
    [Encrypt]
    public FullChild { get; set; }

    // this needs confirmed that the nested fields marked for encryption are properly encrypted
    public PartialChild { get; set; }
}

class FullChild
{
    ...
}

class PartialChild
{
    // this should be nested and encrypted above
    [Encrypt]
    public int MyEncryptedInt { get; set; }

    // this should be nested, but should NOT be encrypted above
    public string MyUnencryptedString { get; set; }
}

Configure automated CI/CD for Nuget publishing

  1. On every commit to master, a ci package is created and published, with the version suffix including the date/time of the build

  2. On every commit to master with a beta tag, a beta package is created and published, also with the version suffix including the date/time of the build

  3. On every commit to master with a release tag, a package is created with the included version, and published if the version doesn't already exist

HashSet<CustomObject> throws when deserializing

Expected

This should work:

var builder = new StringBuilder();
using (var textWriter = new StringWriter(builder))
serializer.Serialize(textWriter, instance);

var json = builder.ToString();

using var textReader = new StringReader(json);
using var reader = new JsonTextReader(textReader);
var decrypted = serializer.Deserialize<HashSetParent>(reader);

class Foo
{
    [JsonProperty]
    [Encrypt]
    public readonly HashSet<CustomObject> _items = new HashSet<CustomObject>();
}

class CustomObject
{
    ...
}

Actual

Throws a NullReferenceException in GenericValueProvider.SetValue at the test line:

var decrypted = serializer.Deserialize<HashSetParent>(reader);

Split into separately-versioned packages

The different packages are completely independent from each other. Their versions shouldn’t change unless they actually change. Each should be independently versioned from the others.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.