Builder.setSalt

Sets a salt to be used by the {@link HashService} during hash computation. <p/> This is a convenience alternative to {@link #setSalt(ByteSource)}: it will attempt to convert the argument into a {@link ByteSource} instance using Shiro's default conversion heuristics (as defined by {@link ByteSourceUtil#isCompatible(Object) ByteSourceUtil.isCompatible}. If the object cannot be heuristically converted to a {@code ByteSource}, an {@code IllegalArgumentException} will be thrown.

@param salt a salt to be used by the {@link HashService} during hash computation. @return this {@code Builder} instance for method chaining. @throws IllegalArgumentException if the argument cannot be heuristically converted to a {@link ByteSource} instance. @see #setSalt(ByteSource) @see HashRequest#getSalt()

  1. Builder setSalt(ByteSource salt)
  2. Builder setSalt(Object salt)
    class Builder
    setSalt
    (
    Object salt
    )

Meta