You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2016/11/26 11:48:03 UTC

[1/3] commons-crypto git commit: Add FAQ page

Repository: commons-crypto
Updated Branches:
  refs/heads/master 44301e06c -> 632f1feed


Add FAQ page


Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/d11db423
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/d11db423
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/d11db423

Branch: refs/heads/master
Commit: d11db42306bec6be5dfc659a66e47941d28955bd
Parents: 9c0a452
Author: Benedikt Ritter <be...@gmail.com>
Authored: Sat Nov 26 10:08:49 2016 +0100
Committer: Benedikt Ritter <be...@gmail.com>
Committed: Sat Nov 26 10:08:49 2016 +0100

----------------------------------------------------------------------
 src/site/xdoc/faq.xml | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/d11db423/src/site/xdoc/faq.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/faq.xml b/src/site/xdoc/faq.xml
new file mode 100644
index 0000000..64f5f57
--- /dev/null
+++ b/src/site/xdoc/faq.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<document>
+  <properties>
+    <title>Apache Commons Crypto: FAQ</title>
+  </properties>
+
+  <body>
+
+    <section name="How to use a custom secret generator?">
+      Commons Crypto provides the <code>CryptoRandom</code> interface for defining secret generators.
+
+      props.setProperty(CryptoRandomFactory.CLASSES_KEY, CryptoRandomFactory.RandomProvider.JAVA.getClassName());
+      CryptoRandom random = CryptoRandomFactory.getCryptoRandom(props);
+
+    </section>
+  </body>
+</document>


[2/3] commons-crypto git commit: CRYPTO-131: Provide FAQ page

Posted by br...@apache.org.
CRYPTO-131: Provide FAQ page


Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/217de983
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/217de983
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/217de983

Branch: refs/heads/master
Commit: 217de983601c7de885223f3cf06f5ead54376f64
Parents: d11db42
Author: Benedikt Ritter <be...@gmail.com>
Authored: Sat Nov 26 12:47:33 2016 +0100
Committer: Benedikt Ritter <be...@gmail.com>
Committed: Sat Nov 26 12:47:33 2016 +0100

----------------------------------------------------------------------
 src/changes/changes.xml |  4 ++++
 src/site/site.xml       |  1 +
 src/site/xdoc/faq.xml   | 23 +++++++++++++++++++++--
 3 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/217de983/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 2f9023c..1aaf861 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -61,6 +61,10 @@
    -->
 
   <body>
+    <release version="1.1.0" date="tba" description="tba">
+      <action issue="CRYPTO-131" type="add" dev="britter" >Provide FAQ page.</action>
+    </release>
+
     <release version="1.0.0" date="2016-07-22" description="
 Initial release
  ===============

http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/217de983/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
index 34e99c3..7303639 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -28,6 +28,7 @@
             <item name="Download"
                    href="http://commons.apache.org/proper/commons-crypto/download_crypto.cgi"/>
             <item name="Users guide"   href="/userguide.html"/>
+            <item name="FAQ"           href="/faq.html"/>
             <item name="Javadoc trunk" href="/apidocs/index.html"/>            
         </menu>
 

http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/217de983/src/site/xdoc/faq.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/faq.xml b/src/site/xdoc/faq.xml
index 64f5f57..6f39ca9 100644
--- a/src/site/xdoc/faq.xml
+++ b/src/site/xdoc/faq.xml
@@ -23,11 +23,30 @@ limitations under the License.
 
   <body>
 
+    <h1>Frequently asked questions</h1>
+
     <section name="How to use a custom secret generator?">
       Commons Crypto provides the <code>CryptoRandom</code> interface for defining secret generators.
+      The <code>RandomProvider</code> enum in the <code>CryptoRandomFactory</code> defines some sensible default
+      implementations:
+
+      <dl>
+        <dt>OPENSSL</dt><dd>OpenSSL based JNI implementation shipped with Commons Crypto.</dd>
+        <dt>JAVA</dt><dd>The SecureRandom implementation from the JVM.</dd>
+        <dt>OS</dt><dd>The OS random device implementation. May not be available on some operation systems.</dd>
+      </dl>
+
+      When calling <code>CryptoRandomFactory.getCryptoRandom()</code>, Commons Crypto tries to use the OpenSSL
+      CryptoRandom implementation first. If this fails, the Java implementation is used.
+      In order use a different <code>CryptoRandom</code> implementation (e.g. OS), the
+      <code>CryptoRandomFactory.getCryptoRandom(Properties)</code> method can be used, passing in the desired
+      implementation class names:
 
-      props.setProperty(CryptoRandomFactory.CLASSES_KEY, CryptoRandomFactory.RandomProvider.JAVA.getClassName());
-      CryptoRandom random = CryptoRandomFactory.getCryptoRandom(props);
+<source>
+Properties props = new Properties();
+props.setProperty(CryptoRandomFactory.CLASSES_KEY, CryptoRandomFactory.RandomProvider.OS.getClassName());
+CryptoRandom random = CryptoRandomFactory.getCryptoRandom(props);
+</source>
 
     </section>
   </body>


[3/3] commons-crypto git commit: Merge branch 'CRYPTO-131'

Posted by br...@apache.org.
Merge branch 'CRYPTO-131'


Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/632f1fee
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/632f1fee
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/632f1fee

Branch: refs/heads/master
Commit: 632f1feed2441db48887e31acf18fb1ddb0b62e3
Parents: 44301e0 217de98
Author: Benedikt Ritter <be...@gmail.com>
Authored: Sat Nov 26 12:47:52 2016 +0100
Committer: Benedikt Ritter <be...@gmail.com>
Committed: Sat Nov 26 12:47:52 2016 +0100

----------------------------------------------------------------------
 src/changes/changes.xml |  4 ++++
 src/site/site.xml       |  1 +
 src/site/xdoc/faq.xml   | 53 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 58 insertions(+)
----------------------------------------------------------------------