From abe7ad5541ce935eea0dfcc354858e50dbd89fd2 Mon Sep 17 00:00:00 2001 From: cbonar Date: Fri, 27 Jan 2012 16:20:03 +0100 Subject: [PATCH] # some refactoring (removed some levels of directories) + sha1 build scripts + top level README --- .hgignore | 7 + README.txt | 7 + ciform/build.properties | 72 +++++++ ciform/build.xml | 14 ++ ciform/ivy.xml | 25 +++ .../{src/main/javascript => }/ciform.js | 0 ciform/src/main/javascript/ivy.xml | 25 --- .../{src/main/javascript => }/minilib.js | 0 .../test/javascript/ciform.css | 0 .../test/javascript/ciform.html | 0 .../test/javascript/scrapbook.html | 0 codecs/base64/ivy.xml | 2 +- codecs/sha1/build.properties | 65 ++++-- codecs/sha1/build.xml | 196 +----------------- codecs/sha1/ivy.xml | 27 +-- tools/ant-js.xml | 103 ++++++++- 16 files changed, 298 insertions(+), 245 deletions(-) create mode 100644 README.txt create mode 100644 ciform/build.properties create mode 100644 ciform/build.xml create mode 100644 ciform/ivy.xml rename ciform/src/main/javascript/{src/main/javascript => }/ciform.js (100%) delete mode 100644 ciform/src/main/javascript/ivy.xml rename ciform/src/main/javascript/{src/main/javascript => }/minilib.js (100%) rename ciform/src/{main/javascript => }/test/javascript/ciform.css (100%) rename ciform/src/{main/javascript => }/test/javascript/ciform.html (100%) rename ciform/src/{main/javascript => }/test/javascript/scrapbook.html (100%) diff --git a/.hgignore b/.hgignore index 9b050ba..628eff3 100644 --- a/.hgignore +++ b/.hgignore @@ -13,3 +13,10 @@ codecs/rsa/build codecs/base64/build codecs/base64/local.properties codecs/hex/build +ciform/local.properties +ciform/target +codecs/sha1/build +codecs/sha1/local.properties +codecs/sha1/target +ciform/build +ciform/lib diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..71b451e --- /dev/null +++ b/README.txt @@ -0,0 +1,7 @@ +This folder contains several projects and dependent resources : + +ciform -> Ciform project directory tree +codecs -> Dependent Javascript libraries for Ciform + Each subdirectory is a Maven-style project with a build script that generates Ivy artifacts for use with Ciform. + Run "ant install" to generate and import artifacts into the local Ivy repository. +tools -> Tools required to build the projects : extract required binaries before building the projects \ No newline at end of file diff --git a/ciform/build.properties b/ciform/build.properties new file mode 100644 index 0000000..7ab7f24 --- /dev/null +++ b/ciform/build.properties @@ -0,0 +1,72 @@ +######################################## +# +# This file is a convenient way to define some parameters, +# rather than from inside the build script. +# +# Depending on the ant targets that will be invoked, +# some properties will be required, some others won't. +# +# Some important properties are marked "required" so you can spot +# the ones to define locally if you want to build this project. +# +# You should not need to override those properties. +# If you really need to, you can create a new file called "local.properties" +# in the same directory and put inside any property you want to fit your local configuration. +# +# Do NOT commit the "local.properties" file to the version control system +# (CVS, SVN, ...) : it should stay as a local configuration only. +# Do not commit or remove this file from the v.c.s. either ;-o +# +# If you don't wish to create such a file, you can pass the required properties +# to ant as command line arguments using the -D option. +# +######################################## + +basedir=. + +# Where the source files are : here Maven-style +src.dir=${basedir}/src/main/javascript + +# Directory used to put temporary files during build +build.dir=${basedir}/build + +# Where the generated files are going +target.dir=${basedir}/target + +# Where the generated libraries are going +lib.dir=${target.dir}/lib + +# Where to copy the documentation +doc.dir=${target.dir}/doc + + +######################################## +# +# External programs : you should copy this section to "local.properties" +# and change it for your configuration. +# +######################################## + +# (convenience) -> set to common 'tools' directory +#tools.dir=../../tools + +# JsUnit files +#jsunit.dir=/opt/jsunit +jsunit.coreJs=${jsunit.dir}/app/jsUnitCore.js +#jsunit.build=${jsunit.dir}/build.xml +jsunit.testRunner=${jsunit.dir}/testRunner.html +#jsunit.browsers=/usr/bin/firefox,/usr/bin/konqueror + +# Ant settings +# (required) -> set to Ivy library containing Ant task +#ant.ivytask.path=${tools.dir}/ivy-2.2.0.jar +# (required) -> set to Javascript Ant template project +#ant.jsproject.path=${tools.dir}/ant-js.xml + +# (required) -> define this property in your "local.properties" file +# Full path to the jar of the YUI compressor (http://developer.yahoo.com/yui/compressor) +#yuicompressor.jar=${tools.dir}/yuicompressor-2.4.7.jar + +# (required) -> define this property in your "local.properties" file +# Installation directory of JSDoc-toolkit (http://code.google.com/p/jsdoc-toolki) +#jsdoc.dir=${tools.dir}/jsdoc-toolkit \ No newline at end of file diff --git a/ciform/build.xml b/ciform/build.xml new file mode 100644 index 0000000..880e54d --- /dev/null +++ b/ciform/build.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/ciform/ivy.xml b/ciform/ivy.xml new file mode 100644 index 0000000..e31a6c3 --- /dev/null +++ b/ciform/ivy.xml @@ -0,0 +1,25 @@ + + + + + + Ciform encrypts web forms before they are submitted, so data is not sent in clear text over the Internet. + + + + + + + + + + + + + + + + + + + diff --git a/ciform/src/main/javascript/src/main/javascript/ciform.js b/ciform/src/main/javascript/ciform.js similarity index 100% rename from ciform/src/main/javascript/src/main/javascript/ciform.js rename to ciform/src/main/javascript/ciform.js diff --git a/ciform/src/main/javascript/ivy.xml b/ciform/src/main/javascript/ivy.xml deleted file mode 100644 index a54c82b..0000000 --- a/ciform/src/main/javascript/ivy.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - Ciform encrypts web forms before they are submitted, so data is not sent in clear text over the Internet. - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ciform/src/main/javascript/src/main/javascript/minilib.js b/ciform/src/main/javascript/minilib.js similarity index 100% rename from ciform/src/main/javascript/src/main/javascript/minilib.js rename to ciform/src/main/javascript/minilib.js diff --git a/ciform/src/main/javascript/test/javascript/ciform.css b/ciform/src/test/javascript/ciform.css similarity index 100% rename from ciform/src/main/javascript/test/javascript/ciform.css rename to ciform/src/test/javascript/ciform.css diff --git a/ciform/src/main/javascript/test/javascript/ciform.html b/ciform/src/test/javascript/ciform.html similarity index 100% rename from ciform/src/main/javascript/test/javascript/ciform.html rename to ciform/src/test/javascript/ciform.html diff --git a/ciform/src/main/javascript/test/javascript/scrapbook.html b/ciform/src/test/javascript/scrapbook.html similarity index 100% rename from ciform/src/main/javascript/test/javascript/scrapbook.html rename to ciform/src/test/javascript/scrapbook.html diff --git a/codecs/base64/ivy.xml b/codecs/base64/ivy.xml index eb70e05..2430d38 100644 --- a/codecs/base64/ivy.xml +++ b/codecs/base64/ivy.xml @@ -1,7 +1,7 @@ - + OpenPGP radix-64/base64 string encoding/decoding. diff --git a/codecs/sha1/build.properties b/codecs/sha1/build.properties index 59324dc..7ab7f24 100644 --- a/codecs/sha1/build.properties +++ b/codecs/sha1/build.properties @@ -1,41 +1,72 @@ ######################################## # -# This file is a convenient way to define some parameters -# specific to the project, rather than from inside the build script. +# This file is a convenient way to define some parameters, +# rather than from inside the build script. # # Depending on the ant targets that will be invoked, # some properties will be required, some others won't. # -# Usually you should not need to override those properties. +# Some important properties are marked "required" so you can spot +# the ones to define locally if you want to build this project. +# +# You should not need to override those properties. # If you really need to, you can create a new file called "local.properties" # in the same directory and put inside any property you want to fit your local configuration. # +# Do NOT commit the "local.properties" file to the version control system +# (CVS, SVN, ...) : it should stay as a local configuration only. +# Do not commit or remove this file from the v.c.s. either ;-o +# # If you don't wish to create such a file, you can pass the required properties # to ant as command line arguments using the -D option. # -# Do NOT commit the "local.properties" file to the version control system -# (CVS, SVN, ...) : it should stay as a local configuration only. -# Do not modify or remove this file from the v.c.s. either ;-o -# ######################################## +basedir=. + # Where the source files are : here Maven-style src.dir=${basedir}/src/main/javascript -# A working directory to store temporary files +# Directory used to put temporary files during build build.dir=${basedir}/build -# Where to find the tests sources -tests.dir=${basedir}/src/test/javascript - -# Where to output tests results -tests.logs=${build.dir}/logs - -# Where to create the packages +# Where the generated files are going target.dir=${basedir}/target # Where the generated libraries are going lib.dir=${target.dir}/lib -# Where to copy the api documentation -doc.dir=${target.dir}/api +# Where to copy the documentation +doc.dir=${target.dir}/doc + + +######################################## +# +# External programs : you should copy this section to "local.properties" +# and change it for your configuration. +# +######################################## + +# (convenience) -> set to common 'tools' directory +#tools.dir=../../tools + +# JsUnit files +#jsunit.dir=/opt/jsunit +jsunit.coreJs=${jsunit.dir}/app/jsUnitCore.js +#jsunit.build=${jsunit.dir}/build.xml +jsunit.testRunner=${jsunit.dir}/testRunner.html +#jsunit.browsers=/usr/bin/firefox,/usr/bin/konqueror + +# Ant settings +# (required) -> set to Ivy library containing Ant task +#ant.ivytask.path=${tools.dir}/ivy-2.2.0.jar +# (required) -> set to Javascript Ant template project +#ant.jsproject.path=${tools.dir}/ant-js.xml + +# (required) -> define this property in your "local.properties" file +# Full path to the jar of the YUI compressor (http://developer.yahoo.com/yui/compressor) +#yuicompressor.jar=${tools.dir}/yuicompressor-2.4.7.jar + +# (required) -> define this property in your "local.properties" file +# Installation directory of JSDoc-toolkit (http://code.google.com/p/jsdoc-toolki) +#jsdoc.dir=${tools.dir}/jsdoc-toolkit \ No newline at end of file diff --git a/codecs/sha1/build.xml b/codecs/sha1/build.xml index 95296c1..f1f1a9f 100644 --- a/codecs/sha1/build.xml +++ b/codecs/sha1/build.xml @@ -1,198 +1,16 @@ - + - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/codecs/sha1/ivy.xml b/codecs/sha1/ivy.xml index 90b937c..642eade 100644 --- a/codecs/sha1/ivy.xml +++ b/codecs/sha1/ivy.xml @@ -1,20 +1,23 @@ - - - - - - - This library provides an implementation of the SHA-1 hash algorithm. + + + + + + A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined in FIPS PUB 180-1 + + + + + + - - - - + + - \ No newline at end of file + diff --git a/tools/ant-js.xml b/tools/ant-js.xml index 5296b28..99cb6bd 100644 --- a/tools/ant-js.xml +++ b/tools/ant-js.xml @@ -27,6 +27,13 @@ + + @@ -39,6 +46,29 @@ + + + + + + + + + + @@ -56,7 +86,7 @@ - + @@ -114,4 +144,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +