Skip to content

Commit bc96876

Browse files
committed
Javadoc
1 parent 99c53ff commit bc96876

File tree

1 file changed

+30
-30
lines changed
  • src/main/java/org/apache/commons/codec/digest

1 file changed

+30
-30
lines changed

src/main/java/org/apache/commons/codec/digest/Blake3.java

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,9 @@ private static void g(final int[] state, final int a, final int b, final int c,
338338
/**
339339
* Calculates the Blake3 hash of the provided data.
340340
*
341-
* @param data source array to absorb data from
342-
* @return 32-byte hash squeezed from the provided data
343-
* @throws NullPointerException if data is null
341+
* @param data source array to absorb data from.
342+
* @return 32-byte hash squeezed from the provided data.
343+
* @throws NullPointerException if data is null.
344344
*/
345345
public static byte[] hash(final byte[] data) {
346346
return initHash().update(data).doFinalize(OUT_LEN);
@@ -360,9 +360,9 @@ public static Blake3 initHash() {
360360
* The instance returned functions as a key-derivation function which can further absorb additional context data
361361
* before squeezing derived key data.
362362
*
363-
* @param kdfContext a globally unique key-derivation context byte string to separate key derivation contexts from each other
364-
* @return fresh Blake3 instance in key derivation mode
365-
* @throws NullPointerException if kdfContext is null
363+
* @param kdfContext a globally unique key-derivation context byte string to separate key derivation contexts from each other.
364+
* @return fresh Blake3 instance in key derivation mode.
365+
* @throws NullPointerException if kdfContext is null.
366366
*/
367367
public static Blake3 initKeyDerivationFunction(final byte[] kdfContext) {
368368
Objects.requireNonNull(kdfContext);
@@ -377,10 +377,10 @@ public static Blake3 initKeyDerivationFunction(final byte[] kdfContext) {
377377
* Constructs a fresh Blake3 keyed hash function. The instance returned functions as a pseudorandom function (PRF) or as a
378378
* message authentication code (MAC).
379379
*
380-
* @param key 32-byte secret key
381-
* @return fresh Blake3 instance in keyed mode using the provided key
382-
* @throws NullPointerException if key is null
383-
* @throws IllegalArgumentException if key is not 32 bytes
380+
* @param key 32-byte secret key.
381+
* @return fresh Blake3 instance in keyed mode using the provided key.
382+
* @throws NullPointerException if key is null.
383+
* @throws IllegalArgumentException if key is not 32 bytes.
384384
*/
385385
public static Blake3 initKeyedHash(final byte[] key) {
386386
Objects.requireNonNull(key);
@@ -393,9 +393,9 @@ public static Blake3 initKeyedHash(final byte[] key) {
393393
/**
394394
* Calculates the Blake3 keyed hash (MAC) of the provided data.
395395
*
396-
* @param key 32-byte secret key
397-
* @param data source array to absorb data from
398-
* @return 32-byte mac squeezed from the provided data
396+
* @param key 32-byte secret key.
397+
* @param data source array to absorb data from.
398+
* @return 32-byte mac squeezed from the provided data.
399399
* @throws NullPointerException if key or data are null
400400
*/
401401
public static byte[] keyedHash(final byte[] key, final byte[] data) {
@@ -454,9 +454,9 @@ private Blake3(final int[] key, final int flags) {
454454
* Finalizes hash output data that depends on the sequence of updated bytes preceding this invocation and any
455455
* previously finalized bytes. Note that this can finalize up to 2<sup>64</sup> bytes per instance.
456456
*
457-
* @param out destination array to finalize bytes into
457+
* @param out destination array to finalize bytes into.
458458
* @return {@code this} instance.
459-
* @throws NullPointerException if out is null
459+
* @throws NullPointerException if out is null.
460460
*/
461461
public Blake3 doFinalize(final byte[] out) {
462462
return doFinalize(out, 0, out.length);
@@ -466,13 +466,13 @@ public Blake3 doFinalize(final byte[] out) {
466466
* Finalizes an arbitrary number of bytes into the provided output array that depends on the sequence of previously
467467
* updated and finalized bytes. Note that this can finalize up to 2<sup>64</sup> bytes per instance.
468468
*
469-
* @param out destination array to finalize bytes into
470-
* @param offset where in the array to begin writing bytes to
471-
* @param length number of bytes to finalize
469+
* @param out destination array to finalize bytes into.
470+
* @param offset where in the array to begin writing bytes to.
471+
* @param length number of bytes to finalize.
472472
* @return {@code this} instance.
473-
* @throws NullPointerException if out is null
473+
* @throws NullPointerException if out is null.
474474
* @throws IndexOutOfBoundsException if offset or length are negative or if offset + length is greater than the
475-
* length of the provided array
475+
* length of the provided array.
476476
*/
477477
public Blake3 doFinalize(final byte[] out, final int offset, final int length) {
478478
checkBufferArgs(out, offset, length);
@@ -483,9 +483,9 @@ public Blake3 doFinalize(final byte[] out, final int offset, final int length) {
483483
/**
484484
* Squeezes and returns an arbitrary number of bytes dependent on the sequence of previously absorbed and squeezed bytes.
485485
*
486-
* @param nrBytes number of bytes to finalize
487-
* @return requested number of finalized bytes
488-
* @throws IllegalArgumentException if nrBytes is negative
486+
* @param nrBytes number of bytes to finalize.
487+
* @return requested number of finalized bytes.
488+
* @throws IllegalArgumentException if nrBytes is negative.
489489
*/
490490
public byte[] doFinalize(final int nrBytes) {
491491
if (nrBytes < 0) {
@@ -508,9 +508,9 @@ public Blake3 reset() {
508508
/**
509509
* Updates this hash state using the provided bytes.
510510
*
511-
* @param in source array to update data from
511+
* @param in source array to update data from.
512512
* @return {@code this} instance.
513-
* @throws NullPointerException if in is null
513+
* @throws NullPointerException if in is null.
514514
*/
515515
public Blake3 update(final byte[] in) {
516516
return update(in, 0, in.length);
@@ -519,13 +519,13 @@ public Blake3 update(final byte[] in) {
519519
/**
520520
* Updates this hash state using the provided bytes at an offset.
521521
*
522-
* @param in source array to update data from
523-
* @param offset where in the array to begin reading bytes
524-
* @param length number of bytes to update
522+
* @param in source array to update data from.
523+
* @param offset where in the array to begin reading bytes.
524+
* @param length number of bytes to update.
525525
* @return {@code this} instance.
526-
* @throws NullPointerException if in is null
526+
* @throws NullPointerException if in is null.
527527
* @throws IndexOutOfBoundsException if offset or length are negative or if offset + length is greater than the
528-
* length of the provided array
528+
* length of the provided array.
529529
*/
530530
public Blake3 update(final byte[] in, final int offset, final int length) {
531531
checkBufferArgs(in, offset, length);

0 commit comments

Comments
 (0)