Coder Social home page Coder Social logo

geheimnis's Introduction

geheimnis

Implementation of cross-platform (clj, cljs) cryptography. The library supports AES/CBC/Pkcs7Padding with a 256 bit key and RSA with arbitrary keysize, as well as simple MD5 hashing. If you need something which is not provided, please open an issue. While geheimnis is not supposed to cover all cryptographic options like OpenSSL compatibility with a big set of chiffres, common and useful algorithms to do standard public-private key solutions should be provided with a solid implementation. geheimnis is supposed to be batteries included on Clojure level, so doing the right thing should be easy.

This library is still very young, but encryption methods work between platforms and are initialized with proper upstream/documented parameters. If you hit any problems, open an issue.

Usage Gitter

Add this to your leiningen project's dependencies: Clojars Project

(require '[geheimnis.rsa :refer [gen-key encrypt decrypt]]
         '[geheimnis.base64 :refer [encode decode]])

(def rsa-key (gen-key 1024))

(decrypt rsa-key (encrypt rsa-key (BigInteger. "123")))

(encode (:pub-key rsa-key)) ;; => #geheimnis/Base64 "AAECAwQFBgcICQ=="
(require '[geheimnis.aes :refer [encrypt decrypt]])

(decrypt "s3cr3T" (encrypt "s3cr3T" (byte-array (range 10))))
(require '[geheimnis.md5 :refer [encode]])

(encode "geheimnis") ;; => "525e92c6aa11544a2ab794f8921ecb0f" 

Clojurescript Testing

Make sure karma and launcher for testing in your favourite browser is installed:

 npm install karma karma-firefox-launcher karma-chrome-launcher karma-safari-launcher  karma-cljs-test --save-dev

Test in your preferred browser by running

lein doo firefox browser-test

TODO

License

Copyright © 2016-2017 Christian Weilbach, Konrad Kühne

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

geheimnis's People

Contributors

kordano avatar whilo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

nha dissoc

geheimnis's Issues

Library breaks build with cljs 1.9.473

after getting no output on upgrading to 1.9.473, i tracked the issue down to this library.

if i build including it (at least with boot), the js doesn't get written: boot -d adzerk/boot-cljs:1.7.228-2 -d org.clojure/clojurescript:1.9.473 -d io.replikativ/geheimnis:0.1.0 -BP -s foo cljs target

with "foo" being a simple core.cljs not even requiring the package

it seems like it fundamentaly breaks something in cljs without causing an error

i posted on clojurians.slack.com in #clojurescript and will update if i get any reply.

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.