License3j | Free Licence Management Library

 by   verhas Java Version: 2.0.1 License: Apache-2.0

kandi X-RAY | License3j Summary

kandi X-RAY | License3j Summary

License3j is a Java library. License3j has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub, Maven.

License3j is a Java library that can be used to create and assert license files. This way Java programs can enforce the users to compensate their use of the software in the form of payment. This is the usual way when closed source programs are distributed. License management alone does not guarantee that the program will not be stolen, pirated or used in any illegal way. However, license management may increase the difficulty to use the program illegally and therefore may drive users to become customers. There is another effect of license management which is a legal aspect. If there is sufficient license management, illegal users have less probability to successfully claim their use was based on the lack of, or on false knowledge of license conditions. License3j is an open source license manager that you can use free of charge for non-profit purposes... as well as for profit purposes as well under the license terms covered by Apache 2.0 license as defined on the web page
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              License3j has a low active ecosystem.
              It has 475 star(s) with 166 fork(s). There are 34 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 60 have been closed. On average issues are closed in 10 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of License3j is 2.0.1

            kandi-Quality Quality

              License3j has 0 bugs and 0 code smells.

            kandi-Security Security

              License3j has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              License3j code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              License3j is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              License3j releases are available to install and integrate.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 1916 lines of code, 195 functions and 21 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed License3j and discovered the below as its top functions. This is intended to give you an instant insight into License3j implemented functionality, and help decide if they suit your requirements.
            • Write key pair
            • Gets the key bytes for the given key
            • Get the byte representation of the private key
            • Closes this system
            • Sign a private key with a given private key
            • Get the signed signature
            • Gets the features in sorted order
            • Creates the byte representation of the feature set
            • Formats a date
            • Parse a date string
            • Gets the instanceId ignoring exception
            • Get a double value
            • Get a float value
            • Get a long value as long
            • Allow this hardware binder to be allowed
            • Specifies that this hardware is denied by the given regex
            • Test program
            • Returns the integer value as int
            • Get a short value as a short
            • Returns the instance id for the given instance ID
            • Returns the byte representation of this object
            • Splits a feature into a string
            • Helper method to parse a number string
            • Get BigDecimal
            • Gets a feature
            • Returns true if the entry has expired
            Get all kandi verified functions for this library.

            License3j Key Features

            No Key Features are available at this moment for License3j.

            License3j Examples and Code Snippets

            No Code Snippets are available at this moment for License3j.

            Community Discussions

            QUESTION

            Signature length not correct when calling PGPOnePassSignature.verify
            Asked 2019-Jul-19 at 08:37

            We’re using a Java libarary called license3j for license management. The library uses asymmetric encryption and relies itself on Bouncycastle. We create a license file using a simple gpg command and verify the license within our software using our public key. So far everything worked fine. BUT: In 1,000 generated licenses, there is a very small fraction which cannot be verified correctly, although, they are in fact valid (approximately 5/1000).

            What happens in this case: When the license is to be verified in com.verhas.licensor.License.setLicenseEncoded(InputStream), the org.bouncycastle.openpgp.PGPOnePassSignature.verify(PGPSignature) throws the following exception:

            org.bouncycastle.openpgp.PGPRuntimeOperationException: unable to verify signature: Signature length not correct: got 511 but was expecting 512

            Sounds rather obscure to me, having only basic cryptography knowledge. Spending hours googling, gave me the clue, that there is something about "leading zeros". So, in the given example, obviously a leading zero was stripped away somewhere (where?), and the lengths of the signature data to compare do not match. Makes sense.

            Now, I’ve no clue, where the issue might be located. Is it during creation of the license file? Essentially, we’re just doing the following:

            ...

            ANSWER

            Answered 2017-Feb-06 at 11:13

            Looks like it is a bug in bouncycastle, only encountered in versions of Java after 1.6, bouncycastle has always created the data wrong, but Java became more strict since 1.7 in the data it will accept during verification.

            Bouncycastle is failing to pad the signature to the right length when it serializes it to the file, if the integer has enough leading zeros then the byte representation of it will be smaller.
            Java versions 1.7 and above expect RSA signature bytes to be the same length as the key.

            Bouncycastle converts the RSA signature byte array(returned from Java's RSA JCE provider) into an integer and it discards information about its length.
            Line 263 of the PGPSignatureGenerator shows where the RSA signature bytes are returned from JCE and converted into an integer.

            This integer is eventually written to the outputstream using MPInteger#encode which just uses the bitlength of the underlying biginteger to determine how much data to write.

            This answer describes more about why you see this aproximatley one in every 200 cases and how the version of Java plays a role.

            Source https://stackoverflow.com/questions/41987227

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install License3j

            The License3j module can be downloaded from the Sonatype central repository. To search the central repo follow the URL http://central.sonatype.org/. If you use maven you can insert the lines. in to your pom.xml file. Check the central repository for the latest version.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
            Maven
            Gradle
            CLONE
          • HTTPS

            https://github.com/verhas/License3j.git

          • CLI

            gh repo clone verhas/License3j

          • sshUrl

            git@github.com:verhas/License3j.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Java Libraries

            CS-Notes

            by CyC2018

            JavaGuide

            by Snailclimb

            LeetCodeAnimation

            by MisterBooo

            spring-boot

            by spring-projects

            Try Top Libraries by verhas

            javageci

            by verhasJava

            fluflu

            by verhasJava

            jamal

            by verhasJava

            immutator

            by verhasJava

            djcproxy

            by verhasJava