io.vertx.rxjava.ext.auth.mongo

## Class HashStrategy

- java.lang.Object
- - io.vertx.rxjava.ext.auth.mongo.HashStrategy

-     public class HashStrategy
      extends Object

  Determines how the hashing is computed in the implementation You can implement this to provide a different hashing strategy to the default.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HashStrategy(HashStrategy delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `computeHash(String password, User user)` Compute the hashed password given the unhashed password and the user
    `Object` | `getDelegate()`
    `String` | `getSalt(User user)` Retrieve the salt.
    `HashSaltStyle` | `getSaltStyle()` Get the defined `io.vertx.rxjava.ext.auth.mongo.HashSaltStyle` of the current instance
    `String` | `getStoredPwd(User user)` Retrieve the password from the user, or as clear text or as hashed version, depending on the definition
    `static HashStrategy` | `newInstance(HashStrategy arg)`
    `void` | `setExternalSalt(String salt)` Set an external salt.
    `void` | `setSaltStyle(HashSaltStyle saltStyle)` Set the saltstyle as defined by `io.vertx.rxjava.ext.auth.mongo.HashSaltStyle`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HashStrategy

          public HashStrategy(HashStrategy delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

    - #### computeHash

          public String computeHash(String password,
                                    User user)

      Compute the hashed password given the unhashed password and the user
      Parameters:
        `password` - the unhashed password
        `user` - the user to get the salt for. This paramter is needed, if the is declared to be used
      Returns:
        the hashed password

    - #### getStoredPwd

          public String getStoredPwd(User user)

      Retrieve the password from the user, or as clear text or as hashed version, depending on the definition
      Parameters:
        `user` - the user to get the stored password for
      Returns:
        the password, either as hashed version or as cleartext, depending on the preferences

    - #### getSalt

          public String getSalt(User user)

      Retrieve the salt. The source of the salt can be the external salt or the propriate column of the given user, depending on the defined `io.vertx.rxjava.ext.auth.mongo.HashSaltStyle`
      Parameters:
        `user` - the user to get the salt for. This paramter is needed, if the is declared to be used
      Returns:
        null in case of the salt of the user or a defined external salt

    - #### setExternalSalt

          public void setExternalSalt(String salt)

      Set an external salt. This method should be used in case of
      Parameters:
        `salt` - the salt, which shall be used

    - #### setSaltStyle

          public void setSaltStyle(HashSaltStyle saltStyle)

      Set the saltstyle as defined by `io.vertx.rxjava.ext.auth.mongo.HashSaltStyle`.
      Parameters:
        `saltStyle` - the `io.vertx.rxjava.ext.auth.mongo.HashSaltStyle` to be used

    - #### getSaltStyle

          public HashSaltStyle getSaltStyle()

      Get the defined `io.vertx.rxjava.ext.auth.mongo.HashSaltStyle` of the current instance
      Returns:
        the saltStyle

    - #### newInstance

          public static HashStrategy newInstance(HashStrategy arg)

Copyright © 2016. All rights reserved.