Class List Method List File List

# Class: VertxAuthMongo::HashStrategy

Inherits:
  Object
  - Object
  - VertxAuthMongo::HashStrategy
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-mongo/hash_strategy.rb

## Instance Method Summary (collapse)

- - (Object) compute_hash(password = nil, user = nil)
- - (Object) get_salt(user = nil)
- - (Object) get_salt_style
- - (Object) get_stored_pwd(user = nil)
- - (HashStrategy) initialize(j_del) constructor
  A new instance of HashStrategy.
- - (Object) j_del
- - (Object) set_external_salt(salt = nil)
- - (Object) set_salt_style(saltStyle = nil)

## Constructor Details

### - (`HashStrategy`) initialize(j_del)

Returns a new instance of HashStrategy

    10
    11
    12
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-mongo/hash_strategy.rb', line 10

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) compute_hash(password = nil, user = nil)

Raises:

- (`ArgumentError`)

    22
    23
    24
    25
    26
    27
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-mongo/hash_strategy.rb', line 22

    def compute_hash(password=nil,user=nil)
      if password.class == String && user.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:computeHash, [Java::java.lang.String.java_class,Java::IoVertxExtAuth::User.java_class]).call(password,user.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling compute_hash(password,user)"
    end

### - (`Object`) get_salt(user = nil)

Raises:

- (`ArgumentError`)

    41
    42
    43
    44
    45
    46
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-mongo/hash_strategy.rb', line 41

    def get_salt(user=nil)
      if user.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:getSalt, [Java::IoVertxExtAuth::User.java_class]).call(user.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling get_salt(user)"
    end

### - (`Object`) get_salt_style

Raises:

- (`ArgumentError`)

    67
    68
    69
    70
    71
    72
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-mongo/hash_strategy.rb', line 67

    def get_salt_style
      if !block_given?
        return @j_del.java_method(:getSaltStyle, []).call().name.intern
      end
      raise ArgumentError, "Invalid arguments when calling get_salt_style()"
    end

### - (`Object`) get_stored_pwd(user = nil)

Raises:

- (`ArgumentError`)

    31
    32
    33
    34
    35
    36
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-mongo/hash_strategy.rb', line 31

    def get_stored_pwd(user=nil)
      if user.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:getStoredPwd, [Java::IoVertxExtAuth::User.java_class]).call(user.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling get_stored_pwd(user)"
    end

### - (`Object`) j_del

    15
    16
    17
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-mongo/hash_strategy.rb', line 15

    def j_del
      @j_del
    end

### - (`Object`) set_external_salt(salt = nil)

Raises:

- (`ArgumentError`)

    50
    51
    52
    53
    54
    55
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-mongo/hash_strategy.rb', line 50

    def set_external_salt(salt=nil)
      if salt.class == String && !block_given?
        return @j_del.java_method(:setExternalSalt, [Java::java.lang.String.java_class]).call(salt)
      end
      raise ArgumentError, "Invalid arguments when calling set_external_salt(salt)"
    end

### - (`Object`) set_salt_style(saltStyle = nil)

Raises:

- (`ArgumentError`)

    59
    60
    61
    62
    63
    64
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-mongo/hash_strategy.rb', line 59

    def set_salt_style(saltStyle=nil)
      if saltStyle.class == Symbol && !block_given?
        return @j_del.java_method(:setSaltStyle, [Java::IoVertxExtAuthMongo::HashSaltStyle.java_class]).call(Java::IoVertxExtAuthMongo::HashSaltStyle.valueOf(saltStyle))
      end
      raise ArgumentError, "Invalid arguments when calling set_salt_style(saltStyle)"
    end