Scrypt.Builder

public static class Scrypt.Builder extends Object

Public Method Summary

Scrypt
build()
Scrypt.Builder
setKey(byte[] key)
Sets the signer key.
Scrypt.Builder
setMemoryCost(int memoryCost)
Sets the memory cost.
T extends Builder
setRounds(int rounds)
Sets the number of rounds for the hash algorithm.
Scrypt.Builder
setSaltSeparator(byte[] saltSeparator)
Sets the salt separator.

Protected Method Summary

Scrypt.Builder

Inherited Method Summary

Public Methods

public Scrypt build ()

public Scrypt.Builder setKey (byte[] key)

Sets the signer key. Required field.

Parameters
key Signer key as a byte array.
Returns
  • This builder.

public Scrypt.Builder setMemoryCost (int memoryCost)

Sets the memory cost. Required field.

Parameters
memoryCost an integer between 1 and 14 (inclusive).
Returns
  • this builder.

public T extends Builder setRounds (int rounds)

Sets the number of rounds for the hash algorithm.

Parameters
rounds an integer between 0 and 120000 (inclusive).
Returns
  • this builder.

public Scrypt.Builder setSaltSeparator (byte[] saltSeparator)

Sets the salt separator.

Parameters
saltSeparator Salt separator as a byte array.
Returns
  • This builder.

Protected Methods

protected Scrypt.Builder getInstance ()