Skip to content

Commit d716e2b

Browse files
committed
Clarify docs and reduce visibility of non-public constants
1 parent 7251a46 commit d716e2b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/main/java/com/eatthepath/otp/HmacOneTimePasswordGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class HmacOneTimePasswordGenerator {
5353
/**
5454
* The HMAC algorithm specified by the HOTP standard.
5555
*/
56-
public static final String HOTP_HMAC_ALGORITHM = "HmacSHA1";
56+
static final String HOTP_HMAC_ALGORITHM = "HmacSHA1";
5757

5858
/**
5959
* Creates a new HMAC-based one-time password (HOTP) generator using a default password length

src/main/java/com/eatthepath/otp/TimeBasedOneTimePasswordGenerator.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,18 @@ public class TimeBasedOneTimePasswordGenerator {
4545
public static final Duration DEFAULT_TIME_STEP = Duration.ofSeconds(30);
4646

4747
/**
48-
* A string identifier for the HMAC-SHA1 algorithm (required by HOTP and allowed by TOTP). HMAC-SHA1 is the default
49-
* algorithm for TOTP.
48+
* A string identifier for the HMAC-SHA1 algorithm; HMAC-SHA1 is the default algorithm for TOTP.
5049
*/
5150
public static final String TOTP_ALGORITHM_HMAC_SHA1 = "HmacSHA1";
5251

5352
/**
54-
* A string identifier for the HMAC-SHA256 algorithm (allowed by TOTP).
53+
* A string identifier for the HMAC-SHA256 algorithm.
5554
*/
5655
@SuppressWarnings("unused")
5756
public static final String TOTP_ALGORITHM_HMAC_SHA256 = "HmacSHA256";
5857

5958
/**
60-
* A string identifier for the HMAC-SHA512 algorithm (allowed by TOTP).
59+
* A string identifier for the HMAC-SHA512 algorithm.
6160
*/
6261
@SuppressWarnings("unused")
6362
public static final String TOTP_ALGORITHM_HMAC_SHA512 = "HmacSHA512";

0 commit comments

Comments
 (0)