Skip to content

Commit

Permalink
Fix javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
amdelamar committed Jun 30, 2018
1 parent b25e8db commit 39da9ba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/amdelamar/jotp/type/HOTP.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ protected static int checksum(long num, int digits) {
* @param crypto
* the crypto function to use
* @return An OTP code.
* @throws NoSuchAlgorithmException
* @throws InvalidKeyException
* @throws NoSuchAlgorithmException if hmac sha1 is not available
* @throws InvalidKeyException if given key is inappropriate for this mac
*/
protected static String generateHotp(byte[] secret,
long movingFactor,
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/amdelamar/jotp/type/TOTP.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ protected static byte[] hexStringToBytes(String hex) {
* the shared secret, HEX encoded
* @param time
* a value that reflects a time
* @param returnDigits
* @param digits
* number of digits to return
* @param crypto
* the crypto function to use
* @return numeric String in base 10 that includes digits
* @throws NoSuchAlgorithmException
* @throws InvalidKeyException
* @throws NoSuchAlgorithmException if hmac sha1 is not available
* @throws InvalidKeyException if given key is inappropriate for this mac
*/
protected static String generateTotp(String key, String time, int digits, String crypto)
throws InvalidKeyException, NoSuchAlgorithmException {
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/amdelamar/jotp/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ private Utils() {
* the bytes to use for the HMAC key
* @param text
* the message or text to be authenticated
* @throws NoSuchAlgorithmException
* @throws InvalidKeyException
* @return hash byte array
* @throws NoSuchAlgorithmException if hmac sha1 is not available
* @throws InvalidKeyException if given key is inappropriate for this mac
*/
public static byte[] hmac(String alg, byte[] keyBytes, byte[] text)
throws NoSuchAlgorithmException, InvalidKeyException {
Expand Down

0 comments on commit 39da9ba

Please sign in to comment.