Coder Social home page Coder Social logo

vdstools's Introduction

VdsTools - lib to parse and verify Visible Digital Seals

A Java library to parse and verify visible digital seals (VDS) as specified in

Test VDS can be generated with help of the Sealgen tool. There is also the Sealva Android app which scans, verifies and displays all VDS profiles defined in the above specifications.

Get it on Google Play

How to use

Here is a quick overview how to use the VDS parser and verifier. When you have the decoded raw string or raw bytes from your favorite datamatrix decoder, just put them to the VDS Tools Dataparser like this:

import de.tsenger.vdstools.DataParser;
import de.tsenger.vdstools.Verifier;
import de.tsenger.vdstools.seals.DigitalSeal;
import de.tsenger.vdstools.seals.VdsType;
import de.tsenger.vdstools.seals.Feature;

	...
	DigitalSeal digitalSeal = DataParser.parseVdsSeal(rawBytes);
	VdsType vdsType = digitalSeal.getVdsType()
	
	// Depending on the returned VDS type you can access the seals content
	String mrz = (String) seal.getFeature(Feature.MRZ);
	String azr = (String) seal.getFeature(Feature.AZR);
   
	// Get the VDS signer certificate reference
	String signerCertRef = digitalSeal.getSignerCertRef();
   
	// Provide for the matching X509 signer certificate
	// and use this to verify the VDS signature   
	Verifier verifier = new Verifier(digitalSeal, x509SignerCert);
	Verifier.Result result = verifier.verify();
	
	

Also have a look at DataParserTest.java and VerifierTest.java for some more examples.

Documentation

JavaDoc can be found here:

https://javadoc.jitpack.io/com/github/tsenger/vdstools/latest/javadoc/index.html

How to include

https://jitpack.io/#tsenger/vdstools

Release

Gradle

To include this library to your Gradle build add:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

and the dependency:

dependencies {
	implementation 'com.github.tsenger:vdstools:0.2.1'
}

Maven

To include this library to your Maven build add:

<repositories>
	<repository>
		<id>jitpack.io</id>
		<url>https://jitpack.io</url>
	</repository>
</repositories>

and the dependency:

<dependency>
	<groupId>com.github.tsenger</groupId>
	<artifactId>vdstools</artifactId>
	<version>0.2.1</version>
</dependency>

vdstools's People

Contributors

axelnennker avatar tsenger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

axelnennker

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.