Skip to content

Commit

Permalink
javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
darkv committed Dec 12, 2012
1 parent 86771b9 commit 2fd7dc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public static String getProperty(final String key)
* Look up a property from the properties file.
*
* @param key The name of the property to be found
* @param defaultValue The default value if property is null
* @return The value of the property
*/
public static String getProperty(final String key, final String defaultValue)
Expand All @@ -116,7 +117,7 @@ public static String getProperty(final String key, final String defaultValue)
/**
* Looks up the value of a key from the properties file and converts it to an integer.
*
* @param key
* @param key The name of the property to be found
* @return The value of that key
*/
public static int getIntProperty(final String key)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
* MACs, IP addresses, time elements, and sequential numbers. GUIDs are not
* expected to be random and most often are easy/possible to guess given a
* sample from a given generator. SQL Server, for example generates GUID that
* are unique but sequencial within a given instance.
* are unique but sequential within a given instance.
* </p>
*
* <p>
* GUIDs can be used as security devices to hide things such as files within a
* filesystem where listings are unavailable (e.g. files that are served up from
* a Web server with indexing turned off). This may be desireable in cases where
* a Web server with indexing turned off). This may be desirable in cases where
* standard authentication is not appropriate. In this scenario, the RandomGUIDs
* are used as directories. Another example is the use of GUIDs for primary keys
* in a database where you want to ensure that the keys are secret. Random GUIDs
Expand All @@ -34,7 +34,7 @@
* </p>
*
* <p>
* There are many other possiblities of using GUIDs in the realm of security and
* There are many other possibilities of using GUIDs in the realm of security and
* encryption where the element of randomness is important. This class was
* written for these purposes but can also be used as a general purpose GUID
* generator as well.
Expand Down Expand Up @@ -72,9 +72,9 @@
* </p>
*
* <p>
* Using the secure random option, this class compies with the statistical
* Using the secure random option, this class complies with the statistical
* random number generator tests specified in FIPS 140-2, Security Requirements
* for Cryptographic Modules, secition 4.9.1.
* for Cryptographic Modules, section 4.9.1.
* </p>
*
* <p>
Expand Down Expand Up @@ -201,8 +201,8 @@ private void getRandomGUID(boolean secure) {
rand = myRand.nextLong();
}

// This StringBuffer can be a long as you need; the MD5
// hash will always return 128 bits. You can change
// This StringBuilder can be a long as you need; the MD5
// hash will always return 128 bits. You can change
// the seed to include anything you want here.
// You could even stream a file through the MD5 making
// the odds of guessing it at least as great as that
Expand Down Expand Up @@ -238,6 +238,7 @@ private void getRandomGUID(boolean secure) {
*
* @return a {@code String} representation of this object
*/
@Override
public String toString() {
String raw = valueAfterMD5.toUpperCase();
StringBuilder sb = new StringBuilder();
Expand Down

0 comments on commit 2fd7dc7

Please sign in to comment.