cronto 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/.idea/.gitignore +2 -0
- data/.idea/artifacts/cronto_jar.xml +11 -0
- data/.idea/description.html +1 -0
- data/.idea/dictionaries/vjt.xml +7 -0
- data/.idea/encodings.xml +6 -0
- data/.idea/libraries/ImageGeneratorSDK_4_19_0.xml +10 -0
- data/.idea/libraries/UtilitiesSDK_4_19_0.xml +9 -0
- data/.idea/libraries/commons_codec_commons_codec_1_15.xml +10 -0
- data/.idea/misc.xml +9 -0
- data/.idea/modules.xml +8 -0
- data/.idea/project-template.xml +3 -0
- data/.idea/vcs.xml +6 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +20 -0
- data/README.md +32 -0
- data/Rakefile +1 -0
- data/bin/cronto +10 -0
- data/cronto.gemspec +27 -0
- data/cronto.iml +14 -0
- data/cronto.properties +2 -0
- data/cronto.xml +200 -0
- data/lib/ImageGeneratorSDK-4.19.0.jar +0 -0
- data/lib/UtilitiesSDK-4.19.0.jar +0 -0
- data/lib/cronto.rb +27 -0
- data/src/META-INF/MANIFEST.MF +3 -0
- data/src/org/ifad/vasco/cronto/Main.java +43 -0
- metadata +102 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8fbaffc7d78ea5fe8a4525af6508b5fa9dd84ff6c003173e589346401dc2fd03
|
4
|
+
data.tar.gz: 424b3a401cad59982b0d3a8525569bba7e04c16861a314fb386375daceb6ef9c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 213b0e9fa2504ef9cf0a91aeafc590084ba75e100e6145130b7aba2ba9d3c0a8c9cd8a7ef11f375d18eef4b99f4886de86d613d61a1f3ed0b36bf58fe8512d38
|
7
|
+
data.tar.gz: '094aceed43f956587102a97a1d5d669bd04b924a2c58dc209394feb3bb125cae9b48eda3e3720478077d0e1037060e9c4300874f519575ad2553d565884e953b'
|
data/.gitignore
ADDED
data/.idea/.gitignore
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
<component name="ArtifactManager">
|
2
|
+
<artifact type="jar" build-on-make="true" name="cronto:jar">
|
3
|
+
<output-path>$PROJECT_DIR$/out/artifacts/cronto_jar</output-path>
|
4
|
+
<root id="archive" name="cronto.jar">
|
5
|
+
<element id="module-output" name="cronto" />
|
6
|
+
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/commons-codec/commons-codec/1.15/commons-codec-1.15.jar" path-in-jar="/" />
|
7
|
+
<element id="extracted-dir" path="$PROJECT_DIR$/lib/UtilitiesSDK-4.19.0.jar" path-in-jar="/" />
|
8
|
+
<element id="extracted-dir" path="$PROJECT_DIR$/lib/ImageGeneratorSDK-4.19.0.jar" path-in-jar="/" />
|
9
|
+
</root>
|
10
|
+
</artifact>
|
11
|
+
</component>
|
@@ -0,0 +1 @@
|
|
1
|
+
<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
|
data/.idea/encodings.xml
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
<component name="libraryTable">
|
2
|
+
<library name="ImageGeneratorSDK-4.19.0">
|
3
|
+
<CLASSES>
|
4
|
+
<root url="jar://$PROJECT_DIR$/lib/ImageGeneratorSDK-4.19.0.jar!/" />
|
5
|
+
<root url="jar://$PROJECT_DIR$/lib/UtilitiesSDK-4.19.0.jar!/" />
|
6
|
+
</CLASSES>
|
7
|
+
<JAVADOC />
|
8
|
+
<SOURCES />
|
9
|
+
</library>
|
10
|
+
</component>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<component name="libraryTable">
|
2
|
+
<library name="commons-codec:commons-codec:1.15" type="repository">
|
3
|
+
<properties maven-id="commons-codec:commons-codec:1.15" />
|
4
|
+
<CLASSES>
|
5
|
+
<root url="jar://$MAVEN_REPOSITORY$/commons-codec/commons-codec/1.15/commons-codec-1.15.jar!/" />
|
6
|
+
</CLASSES>
|
7
|
+
<JAVADOC />
|
8
|
+
<SOURCES />
|
9
|
+
</library>
|
10
|
+
</component>
|
data/.idea/misc.xml
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectKey">
|
4
|
+
<option name="state" value="project://e2804f05-5315-4fc6-a121-c522a6c26470" />
|
5
|
+
</component>
|
6
|
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
7
|
+
<output url="file://$PROJECT_DIR$/out" />
|
8
|
+
</component>
|
9
|
+
</project>
|
data/.idea/modules.xml
ADDED
data/.idea/vcs.xml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# CRONTO Image generator
|
2
|
+
|
3
|
+
This is a super simple command-line wrapper for Onespan's [Image Generator SDK][Onespan-IMG-SDK]
|
4
|
+
to generate cronto images out of the getSecureChallenge SOAP API call output, for provisioning
|
5
|
+
DIGIPASS smart tokens.
|
6
|
+
|
7
|
+
Use it by passing the secure challenge hex string as the first parameter, and get a base64-encoded
|
8
|
+
PNG image as a result.
|
9
|
+
|
10
|
+
# Usage from the command line
|
11
|
+
|
12
|
+
```
|
13
|
+
./bin/cronto yourdata
|
14
|
+
```
|
15
|
+
|
16
|
+
spits on standard output the cronto image encoded as a base64 PNG
|
17
|
+
|
18
|
+
# Usage within Ruby apps
|
19
|
+
|
20
|
+
Add to Gemfile
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
gem 'cronto'
|
24
|
+
```
|
25
|
+
|
26
|
+
return a string with the cronto image as a base64 PNG
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
Cronto.generate('yourdata')
|
30
|
+
```
|
31
|
+
|
32
|
+
[Onespan-IMG-SDK]: https://community.onespan.com/documentation/mobile-security-suite/guides/integration-guides/developer/generate-crontosign-and-cronto-dynamic-images-image-generator-sdk
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/cronto
ADDED
data/cronto.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "cronto"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "cronto"
|
7
|
+
spec.version = Cronto::VERSION
|
8
|
+
spec.authors = ["Marcello Barnaba"]
|
9
|
+
spec.email = ["vjt@openssl.it"]
|
10
|
+
|
11
|
+
spec.summary = %q{CRONTO image generator executable}
|
12
|
+
spec.description = %q{This gem contains a Java wrapper for OneSpan Image SDK that generates CRONTO images}
|
13
|
+
spec.homepage = "https://github.com/ifad/cronto"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
end
|
21
|
+
spec.bindir = "bin"
|
22
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
26
|
+
spec.add_development_dependency "rake"
|
27
|
+
end
|
data/cronto.iml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
4
|
+
<exclude-output />
|
5
|
+
<content url="file://$MODULE_DIR$">
|
6
|
+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
7
|
+
</content>
|
8
|
+
<orderEntry type="inheritedJdk" />
|
9
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
10
|
+
<orderEntry type="library" name="commons-codec:commons-codec:1.15" level="project" />
|
11
|
+
<orderEntry type="library" name="ImageGeneratorSDK-4.19.0" level="project" />
|
12
|
+
<orderEntry type="library" name="UtilitiesSDK-4.19.0" level="project" />
|
13
|
+
</component>
|
14
|
+
</module>
|
data/cronto.properties
ADDED
data/cronto.xml
ADDED
@@ -0,0 +1,200 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project name="cronto" default="all">
|
3
|
+
|
4
|
+
|
5
|
+
<property file="cronto.properties"/>
|
6
|
+
<!-- Uncomment the following property if no tests compilation is needed -->
|
7
|
+
<!--
|
8
|
+
<property name="skip.tests" value="true"/>
|
9
|
+
-->
|
10
|
+
|
11
|
+
<!-- Compiler options -->
|
12
|
+
|
13
|
+
<property name="compiler.debug" value="on"/>
|
14
|
+
<property name="compiler.generate.no.warnings" value="off"/>
|
15
|
+
<property name="compiler.args" value=""/>
|
16
|
+
<property name="compiler.max.memory" value="700m"/>
|
17
|
+
<patternset id="ignored.files">
|
18
|
+
<exclude name="**/*.hprof/**"/>
|
19
|
+
<exclude name="**/*.pyc/**"/>
|
20
|
+
<exclude name="**/*.pyo/**"/>
|
21
|
+
<exclude name="**/*.rbc/**"/>
|
22
|
+
<exclude name="**/*.yarb/**"/>
|
23
|
+
<exclude name="**/*~/**"/>
|
24
|
+
<exclude name="**/.DS_Store/**"/>
|
25
|
+
<exclude name="**/.git/**"/>
|
26
|
+
<exclude name="**/.hg/**"/>
|
27
|
+
<exclude name="**/.svn/**"/>
|
28
|
+
<exclude name="**/CVS/**"/>
|
29
|
+
<exclude name="**/__pycache__/**"/>
|
30
|
+
<exclude name="**/_svn/**"/>
|
31
|
+
<exclude name="**/vssver.scc/**"/>
|
32
|
+
<exclude name="**/vssver2.scc/**"/>
|
33
|
+
</patternset>
|
34
|
+
<patternset id="library.patterns">
|
35
|
+
<include name="*.war"/>
|
36
|
+
<include name="*.swc"/>
|
37
|
+
<include name="*.apk"/>
|
38
|
+
<include name="*.zip"/>
|
39
|
+
<include name="*.egg"/>
|
40
|
+
<include name="*.ear"/>
|
41
|
+
<include name="*.ane"/>
|
42
|
+
<include name="*.jar"/>
|
43
|
+
<include name="*.klib"/>
|
44
|
+
</patternset>
|
45
|
+
<patternset id="compiler.resources">
|
46
|
+
<exclude name="**/?*.java"/>
|
47
|
+
<exclude name="**/?*.form"/>
|
48
|
+
<exclude name="**/?*.class"/>
|
49
|
+
<exclude name="**/?*.groovy"/>
|
50
|
+
<exclude name="**/?*.scala"/>
|
51
|
+
<exclude name="**/?*.flex"/>
|
52
|
+
<exclude name="**/?*.kt"/>
|
53
|
+
<exclude name="**/?*.clj"/>
|
54
|
+
<exclude name="**/?*.aj"/>
|
55
|
+
</patternset>
|
56
|
+
|
57
|
+
|
58
|
+
<!-- Project Libraries -->
|
59
|
+
|
60
|
+
<path id="library.commons-codec:commons-codec:1.15.classpath">
|
61
|
+
<pathelement location="${path.variable.maven_repository}/commons-codec/commons-codec/1.15/commons-codec-1.15.jar"/>
|
62
|
+
</path>
|
63
|
+
|
64
|
+
<path id="library.imagegeneratorsdk-4.19.0.classpath">
|
65
|
+
<pathelement location="${basedir}/lib/ImageGeneratorSDK-4.19.0.jar"/>
|
66
|
+
<pathelement location="${basedir}/lib/UtilitiesSDK-4.19.0.jar"/>
|
67
|
+
</path>
|
68
|
+
|
69
|
+
<path id="library.utilitiessdk-4.19.0.classpath">
|
70
|
+
<pathelement location="${basedir}/lib/UtilitiesSDK-4.19.0.jar"/>
|
71
|
+
</path>
|
72
|
+
|
73
|
+
<!-- Modules -->
|
74
|
+
|
75
|
+
|
76
|
+
<!-- Module cronto -->
|
77
|
+
|
78
|
+
<dirname property="module.cronto.basedir" file="${ant.file}"/>
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
<property name="compiler.args.cronto" value="-encoding UTF-8 -source 13 -target 13 ${compiler.args}"/>
|
83
|
+
|
84
|
+
<property name="cronto.output.dir" value="${module.cronto.basedir}/out/production/cronto"/>
|
85
|
+
<property name="cronto.testoutput.dir" value="${module.cronto.basedir}/out/test/cronto"/>
|
86
|
+
|
87
|
+
<path id="cronto.module.bootclasspath">
|
88
|
+
<!-- Paths to be included in compilation bootclasspath -->
|
89
|
+
</path>
|
90
|
+
|
91
|
+
<path id="cronto.module.production.classpath">
|
92
|
+
<path refid="library.commons-codec:commons-codec:1.15.classpath"/>
|
93
|
+
<path refid="library.imagegeneratorsdk-4.19.0.classpath"/>
|
94
|
+
<path refid="library.utilitiessdk-4.19.0.classpath"/>
|
95
|
+
</path>
|
96
|
+
|
97
|
+
<path id="cronto.runtime.production.module.classpath">
|
98
|
+
<pathelement location="${cronto.output.dir}"/>
|
99
|
+
<path refid="library.commons-codec:commons-codec:1.15.classpath"/>
|
100
|
+
<path refid="library.imagegeneratorsdk-4.19.0.classpath"/>
|
101
|
+
<path refid="library.utilitiessdk-4.19.0.classpath"/>
|
102
|
+
</path>
|
103
|
+
|
104
|
+
<path id="cronto.module.classpath">
|
105
|
+
<pathelement location="${cronto.output.dir}"/>
|
106
|
+
<path refid="library.commons-codec:commons-codec:1.15.classpath"/>
|
107
|
+
<path refid="library.imagegeneratorsdk-4.19.0.classpath"/>
|
108
|
+
<path refid="library.utilitiessdk-4.19.0.classpath"/>
|
109
|
+
</path>
|
110
|
+
|
111
|
+
<path id="cronto.runtime.module.classpath">
|
112
|
+
<pathelement location="${cronto.testoutput.dir}"/>
|
113
|
+
<pathelement location="${cronto.output.dir}"/>
|
114
|
+
<path refid="library.commons-codec:commons-codec:1.15.classpath"/>
|
115
|
+
<path refid="library.imagegeneratorsdk-4.19.0.classpath"/>
|
116
|
+
<path refid="library.utilitiessdk-4.19.0.classpath"/>
|
117
|
+
</path>
|
118
|
+
|
119
|
+
|
120
|
+
<patternset id="excluded.from.module.cronto">
|
121
|
+
<patternset refid="ignored.files"/>
|
122
|
+
</patternset>
|
123
|
+
|
124
|
+
<patternset id="excluded.from.compilation.cronto">
|
125
|
+
<patternset refid="excluded.from.module.cronto"/>
|
126
|
+
</patternset>
|
127
|
+
|
128
|
+
<path id="cronto.module.sourcepath">
|
129
|
+
<dirset dir="${module.cronto.basedir}">
|
130
|
+
<include name="src"/>
|
131
|
+
</dirset>
|
132
|
+
</path>
|
133
|
+
|
134
|
+
|
135
|
+
<target name="compile.module.cronto" depends="compile.module.cronto.production,compile.module.cronto.tests" description="Compile module cronto"/>
|
136
|
+
|
137
|
+
<target name="compile.module.cronto.production" description="Compile module cronto; production classes">
|
138
|
+
<mkdir dir="${cronto.output.dir}"/>
|
139
|
+
<javac destdir="${cronto.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true">
|
140
|
+
<compilerarg line="${compiler.args.cronto}"/>
|
141
|
+
<bootclasspath refid="cronto.module.bootclasspath"/>
|
142
|
+
<classpath refid="cronto.module.production.classpath"/>
|
143
|
+
<src refid="cronto.module.sourcepath"/>
|
144
|
+
<patternset refid="excluded.from.compilation.cronto"/>
|
145
|
+
</javac>
|
146
|
+
|
147
|
+
<copy todir="${cronto.output.dir}">
|
148
|
+
<fileset dir="${module.cronto.basedir}/src">
|
149
|
+
<patternset refid="compiler.resources"/>
|
150
|
+
<type type="file"/>
|
151
|
+
</fileset>
|
152
|
+
</copy>
|
153
|
+
</target>
|
154
|
+
|
155
|
+
<target name="compile.module.cronto.tests" depends="compile.module.cronto.production" description="compile module cronto; test classes" unless="skip.tests"/>
|
156
|
+
|
157
|
+
<target name="clean.module.cronto" description="cleanup module">
|
158
|
+
<delete dir="${cronto.output.dir}"/>
|
159
|
+
<delete dir="${cronto.testoutput.dir}"/>
|
160
|
+
</target>
|
161
|
+
|
162
|
+
<target name="init" description="Build initialization">
|
163
|
+
<!-- Perform any build initialization in this target -->
|
164
|
+
</target>
|
165
|
+
|
166
|
+
<target name="clean" depends="clean.module.cronto" description="cleanup all"/>
|
167
|
+
|
168
|
+
<target name="build.modules" depends="init, clean, compile.module.cronto" description="build all modules"/>
|
169
|
+
|
170
|
+
<target name="init.artifacts">
|
171
|
+
<property name="artifacts.temp.dir" value="${basedir}/__artifacts_temp"/>
|
172
|
+
<property name="artifact.output.cronto:jar" value="${basedir}/out/artifacts/cronto_jar"/>
|
173
|
+
<mkdir dir="${artifacts.temp.dir}"/>
|
174
|
+
<property name="temp.jar.path.cronto.jar" value="${artifacts.temp.dir}/cronto.jar"/>
|
175
|
+
</target>
|
176
|
+
|
177
|
+
<target name="artifact.cronto:jar" depends="init.artifacts, compile.module.cronto" description="Build 'cronto:jar' artifact">
|
178
|
+
<property name="artifact.temp.output.cronto:jar" value="${artifacts.temp.dir}/cronto_jar"/>
|
179
|
+
<mkdir dir="${artifact.temp.output.cronto:jar}"/>
|
180
|
+
<jar destfile="${temp.jar.path.cronto.jar}" duplicate="preserve" filesetmanifest="mergewithoutmain">
|
181
|
+
<zipfileset dir="${cronto.output.dir}"/>
|
182
|
+
<zipfileset src="${path.variable.maven_repository}/commons-codec/commons-codec/1.15/commons-codec-1.15.jar"/>
|
183
|
+
<zipfileset src="${basedir}/lib/UtilitiesSDK-4.19.0.jar"/>
|
184
|
+
<zipfileset src="${basedir}/lib/ImageGeneratorSDK-4.19.0.jar"/>
|
185
|
+
</jar>
|
186
|
+
<copy file="${temp.jar.path.cronto.jar}" tofile="${artifact.temp.output.cronto:jar}/cronto.jar"/>
|
187
|
+
</target>
|
188
|
+
|
189
|
+
<target name="build.all.artifacts" depends="artifact.cronto:jar" description="Build all artifacts">
|
190
|
+
<mkdir dir="${artifact.output.cronto:jar}"/>
|
191
|
+
<copy todir="${artifact.output.cronto:jar}">
|
192
|
+
<fileset dir="${artifact.temp.output.cronto:jar}"/>
|
193
|
+
</copy>
|
194
|
+
|
195
|
+
<!-- Delete temporary files -->
|
196
|
+
<delete dir="${artifacts.temp.dir}"/>
|
197
|
+
</target>
|
198
|
+
|
199
|
+
<target name="all" depends="build.modules, build.all.artifacts" description="build all"/>
|
200
|
+
</project>
|
Binary file
|
Binary file
|
data/lib/cronto.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'open3'
|
2
|
+
|
3
|
+
module Cronto
|
4
|
+
VERSION = '0.1.0'
|
5
|
+
|
6
|
+
extend self
|
7
|
+
|
8
|
+
class Error < StandardError; end
|
9
|
+
|
10
|
+
def jar
|
11
|
+
File.dirname(File.realpath(__FILE__)) + '/../out/artifacts/cronto_jar/cronto.jar'
|
12
|
+
end
|
13
|
+
|
14
|
+
def generate(*args)
|
15
|
+
out, err, status = Open3.capture3(['java', 'cronto'], '-jar', jar, *args)
|
16
|
+
|
17
|
+
if status.success?
|
18
|
+
return out
|
19
|
+
else
|
20
|
+
raise Cronto::Error, err
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def run(*args)
|
25
|
+
puts generate(*args)
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
package org.ifad.vasco.cronto;
|
2
|
+
|
3
|
+
import com.vasco.image.exception.ImageGeneratorSDKException;
|
4
|
+
import com.vasco.image.generator.ImageGeneratorSDK;
|
5
|
+
import org.apache.commons.codec.binary.Base64;
|
6
|
+
|
7
|
+
import javax.imageio.ImageIO;
|
8
|
+
import java.awt.image.BufferedImage;
|
9
|
+
import java.io.ByteArrayOutputStream;
|
10
|
+
import java.io.IOException;
|
11
|
+
|
12
|
+
public class Main {
|
13
|
+
public static void main(String[] args) throws IOException, ImageGeneratorSDKException {
|
14
|
+
if (args.length != 1) {
|
15
|
+
System.err.println("Usage: cronto <message>");
|
16
|
+
System.exit(1);
|
17
|
+
}
|
18
|
+
|
19
|
+
try {
|
20
|
+
String message = args[0];
|
21
|
+
String image64 = generateCronto(message);
|
22
|
+
System.out.println(image64);
|
23
|
+
}
|
24
|
+
catch (IOException e) {
|
25
|
+
System.err.printf("IO Exception %s\n", e.getMessage());
|
26
|
+
System.exit(-1);
|
27
|
+
}
|
28
|
+
catch (ImageGeneratorSDKException e) {
|
29
|
+
System.err.printf("Onespan Image SDK Error %s\n", e.getErrorMessage());
|
30
|
+
System.exit(-1);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
private static String generateCronto(String message) throws ImageGeneratorSDKException, IOException {
|
35
|
+
BufferedImage cronto = ImageGeneratorSDK.generateCrontoSign(6, message);
|
36
|
+
ByteArrayOutputStream buf = new ByteArrayOutputStream();
|
37
|
+
ImageIO.write(cronto, "png", buf);
|
38
|
+
buf.flush();
|
39
|
+
byte[] image = buf.toByteArray();
|
40
|
+
buf.close();
|
41
|
+
return Base64.encodeBase64String(image);
|
42
|
+
}
|
43
|
+
}
|
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cronto
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Marcello Barnaba
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-10-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: This gem contains a Java wrapper for OneSpan Image SDK that generates
|
42
|
+
CRONTO images
|
43
|
+
email:
|
44
|
+
- vjt@openssl.it
|
45
|
+
executables:
|
46
|
+
- cronto
|
47
|
+
extensions: []
|
48
|
+
extra_rdoc_files: []
|
49
|
+
files:
|
50
|
+
- ".gitignore"
|
51
|
+
- ".idea/.gitignore"
|
52
|
+
- ".idea/artifacts/cronto_jar.xml"
|
53
|
+
- ".idea/description.html"
|
54
|
+
- ".idea/dictionaries/vjt.xml"
|
55
|
+
- ".idea/encodings.xml"
|
56
|
+
- ".idea/libraries/ImageGeneratorSDK_4_19_0.xml"
|
57
|
+
- ".idea/libraries/UtilitiesSDK_4_19_0.xml"
|
58
|
+
- ".idea/libraries/commons_codec_commons_codec_1_15.xml"
|
59
|
+
- ".idea/misc.xml"
|
60
|
+
- ".idea/modules.xml"
|
61
|
+
- ".idea/project-template.xml"
|
62
|
+
- ".idea/vcs.xml"
|
63
|
+
- Gemfile
|
64
|
+
- Gemfile.lock
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- bin/cronto
|
68
|
+
- cronto.gemspec
|
69
|
+
- cronto.iml
|
70
|
+
- cronto.properties
|
71
|
+
- cronto.xml
|
72
|
+
- lib/ImageGeneratorSDK-4.19.0.jar
|
73
|
+
- lib/UtilitiesSDK-4.19.0.jar
|
74
|
+
- lib/cronto.rb
|
75
|
+
- out/artifacts/cronto_jar/cronto.jar
|
76
|
+
- src/META-INF/MANIFEST.MF
|
77
|
+
- src/org/ifad/vasco/cronto/Main.java
|
78
|
+
homepage: https://github.com/ifad/cronto
|
79
|
+
licenses:
|
80
|
+
- MIT
|
81
|
+
metadata: {}
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options: []
|
84
|
+
require_paths:
|
85
|
+
- lib
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
requirements: []
|
97
|
+
rubyforge_project:
|
98
|
+
rubygems_version: 2.7.6.2
|
99
|
+
signing_key:
|
100
|
+
specification_version: 4
|
101
|
+
summary: CRONTO image generator executable
|
102
|
+
test_files: []
|