Giter Club home page Giter Club logo

Comments (4)

jbtule avatar jbtule commented on June 11, 2024

Looking at how Keyczart uses it, I'm guessing this is an oversight. It works in two steps, save the new keymanager, and load and add the new key. Doing so programmatically in one step would be desirable.

from dkeyczar.

dgryski avatar dgryski commented on June 11, 2024

I'll push a fix for this tonight.

from dkeyczar.

acasajus avatar acasajus commented on June 11, 2024

Nice. I've also implemented a reader for directly json encoded data like

{ "meta" : "{heregoes the meta json encoded}", "1" : "{here goes key version 1}" }

do you want me to issue a PR or should I keep it to myself?

from dkeyczar.

dgryski avatar dgryski commented on June 11, 2024

A quick note. The keymanager stuff was written primarily to serve the needs of keyczart, the tool to create and manage keys, rather than a more general purpose library that can be called from an application. Thus, some of the required logic is in the keyczart code and keyman only contains things that poke into the non-exported internals of keyczar keys. This was potentially a bad design decision (keyczar was one of my first Go projects).

BTW is there an easy way to export/import a keymanager to JSON? or should I implement it myself in my code?

A keymanager provides access to a key set, which is a set of JSON files (as produced by ToJSONs()) -- it contains no useful information of its own. Having something which can load a key from an array json array is probably useful for those cases where having the keys on the file system is not possible.

from dkeyczar.

Related Issues (15)

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.