glusk / caesar Goto Github PK
View Code? Open in Web Editor NEWAn object-oriented approach to cryptography in Java.
License: MIT License
An object-oriented approach to cryptography in Java.
License: MIT License
Added the repo to codacy:
https://www.codacy.com/manual/Glusk/caesar
Update push condition to:
if [ "$success"] && [ "$dryRun" = false ]
This fails:
@Test
public void parsesANegativeByteValue() {
assertArrayEquals(
new byte[] { (byte) 0b10000000 },
new Hex("80").asArray()
);
}
The Java 9 modules source path is not properly detected by the coveralls maven plugin.
Coveralls plugin further complains:
Execution default-cli of goal org.eluder.coveralls:coveralls-maven-plugin:4.3.0:report failed: A required class was missing while executing org.eluder.coveralls:coveralls-maven-plugin:4.3.0:report: javax/xml/bind/DatatypeConverter
A workaround was proposed here.
Add an introduction paragraph with maven dependency library usage example.
Document the release process - how to bump the version and triger a release/deployment.
Javadocs feel vague and imprecise.
After closing #25, this dependency is no longer needed!
Lets add this feature to the library!
MessageDigest
objectH(H(b1), b2, b3)
Enable Checkstyle checks for tests but skip Javadoc checks.
Reasons against enforcing Javadoc comments in tests:
/** The test for class Foo. */
)Implement HMAC as specified in RFC 2104.
After implementing #25, the following API changes should be made:
DigestArgument(String, int)
DigestArgument(byte[])
DigestArgument
should be renamed to PlainText
and moved to package com.github.glusk.caesar
BinaryString
Refer to this SO Question!
It contains only one abstract method.
And WrappedBytes
class is not really needed. Wherever there is:
new WrappedBytes(...)
in the code base, one can replace it with:
() -> ...
We want to specify the contract of some of the Object
's methods at the Bytes
interface level. As these can't be implemented as default
methods, we can use a pattern similar to the one used in java.util
(List
and AbstractList
).
Add an abstract class AbstractBytes
that extends implements the Bytes
interface.
Remove the @FunctionalInterface
annotation in Bytes
interface definition since the use of Bytes
in a lambda expression is discouraged. Doing so breaks its equals()
contract, for example.
AbstractBytes
should implement equals()
, hashCode()
and toString()
(YAGNI, at the moment).
Classes that used to implement Bytes
should now extend AbstractBytes
.
Show the core concept of wrapping a MessageDigest
instance into an ImmutableMessageDigestObject
.
Compare Bytes
instead of arrays.
Test coverage should be 100% given the currently (version 0.1.0
) still relatively small codebase size.
At the moment, we're wired to an external dependency jakarta.xml.bind:jakarta.xml.bind-api
just so that we can use DatatypeConverter
. This dependency could be removed.
Java 8 introduced Base64
class and the hex encoding/decoding looks easy enough to implement.
The library currently only parses Base64 and Base16 strings. We should add default
methods to Bytes
that would encode byte sequences to Base64 and Base16 strings.
Lets add a simple xor
function that operates on Bytes
.
Setup Travis to deploy the project to Maven Central every time a new git tag is pushed.
Resources:
-B
(batch mode) flag to all Maven commandsSome code snippets seem to lack focus. The accompanying text could be made shorter.
A release version should not be committed. The flow should be as follows:
release
branch; bump version to a new release tag and push itmaster
branch; bump version to a new snapshot version and push the changeThere should be a "dry run" option that doesn't push anything to the remote repository.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.