Record Class KdfParams

java.lang.Object
java.lang.Record
co.cryptoservice.sdk.KdfParams
Record Components:
N - the scrypt cost, or null
info - the HPKE info, or null
iterations - the PBKDF2 iterations, or null
p - the scrypt parallelism, or null
r - the scrypt block size, or null

public record KdfParams(Integer N, String info, Integer iterations, Integer p, Integer r) extends Record
The params member.
  • Constructor Details

    • KdfParams

      public KdfParams(Integer N, String info, Integer iterations, Integer p, Integer r)
      Creates an instance of a KdfParams record class.
      Parameters:
      N - the value for the N record component
      info - the value for the info record component
      iterations - the value for the iterations record component
      p - the value for the p record component
      r - the value for the r record component
  • Method Details

    • withN

      public KdfParams withN(Integer N)
      A copy with N replaced.
      Parameters:
      N - the scrypt cost, or null
      Returns:
      the new request
    • withInfo

      public KdfParams withInfo(String info)
      A copy with info replaced.
      Parameters:
      info - the HPKE info, or null
      Returns:
      the new request
    • withIterations

      public KdfParams withIterations(Integer iterations)
      A copy with iterations replaced.
      Parameters:
      iterations - the PBKDF2 iterations, or null
      Returns:
      the new request
    • withP

      public KdfParams withP(Integer p)
      A copy with p replaced.
      Parameters:
      p - the scrypt parallelism, or null
      Returns:
      the new request
    • withR

      public KdfParams withR(Integer r)
      A copy with r replaced.
      Parameters:
      r - the scrypt block size, or null
      Returns:
      the new request
    • toString

      public String toString()
      Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.
      Specified by:
      toString in class Record
      Returns:
      a description safe to log
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • N

      public Integer N()
      Returns the value of the N record component.
      Returns:
      the value of the N record component
    • info

      public String info()
      Returns the value of the info record component.
      Returns:
      the value of the info record component
    • iterations

      public Integer iterations()
      Returns the value of the iterations record component.
      Returns:
      the value of the iterations record component
    • p

      public Integer p()
      Returns the value of the p record component.
      Returns:
      the value of the p record component
    • r

      public Integer r()
      Returns the value of the r record component.
      Returns:
      the value of the r record component