Skip to content

Commit 9ca20b2

Browse files
committed
Javadoc clean-up and corrections.
1 parent 035ab5a commit 9ca20b2

File tree

5 files changed

+33
-16
lines changed

5 files changed

+33
-16
lines changed

src/main/java/org/owasp/esapi/SecurityConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,12 +390,12 @@ public interface SecurityConfiguration extends EsapiPropertyLoader {
390390
* especially for any supported cipher mode that is considered a streaming mode
391391
* (which is basically anything except CBC for modes that support require an IV).
392392
* For this reason, 'fixed' has now been removed (it was considered <b>deprecated</b>
393-
* since release 2.2.0.0). An <b>ESAPI.properties</b> value of {@Code fixed} for the property
394-
* {@Code Encryptor.ChooseIVMethod} will now result in a {@Code ConfigurationException}
393+
* since release 2.2.0.0). An <b>ESAPI.properties</b> value of {@code fixed} for the property
394+
* {@code Encryptor.ChooseIVMethod} will now result in a {@code ConfigurationException}
395395
* being thrown.
396396
*
397397
* @return A string specifying the IV type. Should be "random". Anything
398-
* else should fail with a {@Code ConfigurationException} being thrown.
398+
* else should fail with a {@code ConfigurationException} being thrown.
399399
*
400400
* @see #getFixedIV()
401401
* @deprecated Use SecurityConfiguration.getStringProp("appropriate_esapi_prop_name") instead.

src/main/java/org/owasp/esapi/codecs/Codec.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public interface Codec<T> {
7777

7878
/**
7979
* Returns the decoded version of the next character from the input string and advances the
80-
* current character in the PushbackSequence. If the current character is not encoded, this
81-
* method MUST reset the PushbackString.
80+
* current character in the {@code PushbackSequence}. If the current character is not encoded, this
81+
* method <i>MUST</i> reset the {@code PushbackString}.
8282
*
8383
* @param input the Character to decode
8484
*
@@ -100,10 +100,25 @@ public interface Codec<T> {
100100
*/
101101
public String getHexForNonAlphanumeric(int c);
102102

103+
/**
104+
* Convert the {@code char} parameter to its octal representation.
105+
* @param c the character for which to return the new representation.
106+
* @return the octal representation.
107+
*/
103108
public String toOctal(char c);
104109

110+
/**
111+
* Convert the {@code char} parameter to its hexadecimal representation.
112+
* @param c the character for which to return the new representation.
113+
* @return the hexadecimal representation.
114+
*/
105115
public String toHex(char c);
106116

117+
/**
118+
* Convert the {@code int} parameter to its hexadecimal representation.
119+
* @param c the character for which to return the new representation.
120+
* @return the hexadecimal representation.
121+
*/
107122
public String toHex(int c);
108123

109124
/**

src/main/java/org/owasp/esapi/codecs/UnixCodec.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
/**
20-
* Implementation of the Codec interface for '\' encoding from Unix command shell.
20+
* Implementation of the {@code Codec} interface for '\' encoding from Unix command shell (bash lineage, not csh lineage).
2121
*
2222
* @author Jeff Williams (jeff.williams .at. aspectsecurity.com) <a
2323
* href="http://www.aspectsecurity.com">Aspect Security</a>
@@ -29,9 +29,11 @@ public class UnixCodec extends AbstractCharacterCodec {
2929
/**
3030
* {@inheritDoc}
3131
*
32-
* Returns backslash-encoded character
32+
* @return the backslash-encoded character
3333
*
34-
* @param immune
34+
* @param immune Array of characters that should not be encoded. Use with caution! All
35+
* alphanumeric characters are "immune" by default so you needn't
36+
* include them.
3537
*/
3638
public String encodeCharacter( char[] immune, Character c ) {
3739
char ch = c.charValue();
@@ -53,13 +55,15 @@ public String encodeCharacter( char[] immune, Character c ) {
5355

5456
/**
5557
* {@inheritDoc}
56-
*
57-
* Returns the decoded version of the character starting at index, or
58-
* null if no decoding is possible.
58+
*
5959
* <p>
6060
* Formats all are legal both upper/lower case:
61+
* <pre>
6162
* \x - all special characters
62-
*
63+
* </pre>
64+
*
65+
* @return the decoded version of the character starting at index, or
66+
* null if no decoding is possible.
6367
*/
6468
public Character decodeCharacter( PushbackSequence<Character> input ) {
6569
input.mark();
@@ -79,4 +83,4 @@ public Character decodeCharacter( PushbackSequence<Character> input ) {
7983
return second;
8084
}
8185

82-
}
86+
}

src/main/java/org/owasp/esapi/crypto/CipherText.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ protected boolean canEqual(Object other) {
798798
* proved in 1996 [see http://pssic.free.fr/Extra%20Reading/SEC+/SEC+/hmac-cb.pdf] that
799799
* HMAC security doesn’t require that the underlying hash function be collision resistant,
800800
* but only that it acts as a pseudo-random function, which SHA1 satisfies.
801-
* @param authKey The {@Code SecretKey} used with the computed HMAC-SHA1
801+
* @param authKey The {@code SecretKey} used with the computed HMAC-SHA1
802802
* to ensure authenticity.
803803
* @return The value for the MAC.
804804
*/

src/test/java/org/owasp/esapi/reference/ExecutorTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
*/
4343
public class ExecutorTest extends TestCase {
4444

45-
private SecurityConfiguration origConfig;
46-
4745
private static class Conf extends SecurityConfigurationWrapper
4846
{
4947
private final List allowedExes;

0 commit comments

Comments
 (0)