Skip to content

Commit c105395

Browse files
committed
Merge branch 'Marcono1234-OpenBSDBCrypt-doc'
2 parents 6141847 + 9d750bf commit c105395

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

core/src/main/java/org/bouncycastle/crypto/generators/BCrypt.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,10 +616,10 @@ public static byte[] passwordToByteArray(char[] password)
616616

617617
/**
618618
* Calculates the <b>bcrypt</b> hash of an input - note for processing general passwords you want to
619-
* make sure the password is terminated in a manner similar to what is done by passwordToByteArray().
619+
* make sure the password is terminated in a manner similar to what is done by {@link #passwordToByteArray(char[])}.
620620
* <p>
621621
* This implements the raw <b>bcrypt</b> function as defined in the bcrypt specification, not
622-
* the crypt encoded version implemented in OpenBSD.
622+
* the crypt encoded version implemented in OpenBSD, see {@link OpenBSDBCrypt} for that.
623623
* </p>
624624
* @param pwInput the password bytes (up to 72 bytes) to use for this invocation.
625625
* @param salt the 128 bit salt to use for this invocation.

core/src/main/java/org/bouncycastle/crypto/generators/OpenBSDBCrypt.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
* Password hashing scheme BCrypt,
1313
* designed by Niels Provos and David Mazières, using the
1414
* String format and the Base64 encoding
15-
* of the reference implementation on OpenBSD
15+
* of the reference implementation on OpenBSD.
16+
* <p>
17+
* Passwords are encoded using UTF-8. Encoded passwords longer than
18+
* 72 bytes are truncated and all remaining bytes are ignored.
1619
*/
1720
public class OpenBSDBCrypt
1821
{

core/src/main/jdk1.4/org/bouncycastle/crypto/generators/OpenBSDBCrypt.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
* Password hashing scheme BCrypt,
1313
* designed by Niels Provos and David Mazières, using the
1414
* String format and the Base64 encoding
15-
* of the reference implementation on OpenBSD
15+
* of the reference implementation on OpenBSD.
16+
* <p>
17+
* Passwords are encoded using UTF-8. Encoded passwords longer than
18+
* 72 bytes are truncated and all remaining bytes are ignored.
1619
*/
1720
public class OpenBSDBCrypt
1821
{

0 commit comments

Comments
 (0)