@@ -55,6 +55,10 @@ public static byte[] generateSalt() {
5555 * @param password The user password.
5656 *
5757 * @return A new SRP verifier.
58+ *
59+ * @throws IOException If there is a problem generating the X value.
60+ * @throws NoSuchAlgorithmException If the hash algorithm to use does not
61+ * exist.
5862 */
5963 public static byte [] generateVerifier (byte [] salt , String password ) throws IOException , NoSuchAlgorithmException {
6064 BigInteger x = bigIntegerFromBytes (generateX (salt , SrpConstants .API_USERNAME .getBytes (), password .getBytes ()));
@@ -73,6 +77,10 @@ public static byte[] generateVerifier(byte[] salt, String password) throws IOExc
7377 * @param byte_p Password.
7478 *
7579 * @return The X value.
80+ *
81+ * @throws IOException If there is a problem generating the X value.
82+ * @throws NoSuchAlgorithmException If the hash algorithm to use does not
83+ * exist.
7684 */
7785 static byte [] generateX (byte [] byte_s , byte [] byte_I , byte [] byte_p ) throws NoSuchAlgorithmException , IOException {
7886 byte [] byte_x ;
@@ -107,6 +115,10 @@ static byte[] generateX(byte[] byte_s, byte[] byte_I, byte[] byte_p) throws NoSu
107115 * @param byte_K K as per the SRP spec.
108116 *
109117 * @return The M value.
118+ *
119+ * @throws IOException If there is a problem generating the M value.
120+ * @throws NoSuchAlgorithmException If the hash algorithm to use does not
121+ * exist.
110122 */
111123 static byte [] generateM (byte [] byte_N , byte [] byte_g , byte [] byte_I , byte [] byte_s ,
112124 byte [] byte_A , byte [] byte_B , byte [] byte_K ) throws NoSuchAlgorithmException , IOException {
@@ -136,6 +148,9 @@ static byte[] generateM(byte[] byte_N, byte[] byte_g, byte[] byte_I, byte[] byte
136148 * @param byte_2 Byte array 2.
137149 *
138150 * @return Hashed and xor of the given arrays.
151+ *
152+ * @throws NoSuchAlgorithmException If the hash algorithm to use does not
153+ * exist.
139154 */
140155 private static byte [] hashXor (byte [] byte_1 , byte [] byte_2 ) throws NoSuchAlgorithmException {
141156 byte [] ret ;
0 commit comments