Git Product home page Git Product logo

bangcle-crypto-wrapper's Introduction

This project mainly does the following things:

  • Integrate the java and so files generated by Bangcle WhiteCrypto System
  • Generate the CryptoUtils.java and Keys.java files automatically
    • The CryptoUtils.java is a simplified wrapper of Bangcle's crypto tools
    • The Keys.java contains the encrypted keys which are encrypted at build time

Starting

After you clone this repostory, you need to copy the java and so files generated by Bangcle WhiteCrypto System into the corresponding directory in lib-exported module. And then you need to configure the generator-plugin in the lib-exported/build.gradle.

apply plugin: 'bangcle'
bangcle {
    aesKeyHex = ... // Hex string of your AES key
    ivHex = ... // Hex string of your AES iv
    bangcleKey1 = ... // WhiteCrypto encryption key
    bangcleKey2 = ... // WhiteCrypto decryption key
    genPackage = ... // Target package of the generated java files

    keys {
        // key ConstantFiledName, SecretKeyValue
        key ..., ...
    }
}

Note that the generator-plugin will use AES/ECB/PKCS5Padding encryption algorithm to encrypt the keys if you don't provide the ivHex. Otherwise will use AES/CBC/PKCS5Padding encryption algorithm. You can generate random AES keys and ivs at https://asecuritysite.com/encryption/keygen.

bangcle-crypto-wrapper's People

Contributors

nekocode avatar

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.