Class ChaChaSpec.Builder

java.lang.Object
zeroecho.core.alg.chacha.ChaChaSpec.Builder
Enclosing class:
ChaChaSpec

public static final class ChaChaSpec.Builder extends Object
Fluent builder for ChaChaSpec.
Since:
1.0
  • Constructor Details

    • Builder

      public Builder()
      Creates a builder with counter 1 and stream headers disabled.
  • Method Details

    • initialCounter

      public ChaChaSpec.Builder initialCounter(int c)
      Sets the initial counter value.
      Parameters:
      c - non-negative counter value
      Returns:
      this builder
    • header

      Sets the optional header codec.
      Parameters:
      codec - header codec or null
      Returns:
      this builder
    • build

      public ChaChaSpec build()
      Builds an immutable ChaChaSpec.
      Returns:
      constructed spec