Class: VertxAuthCommon::HashingAlgorithm

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/hashing_algorithm.rb

Overview

Hashing Algorithm. A common interface to interact with any system provided algorithms.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


17
18
19
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/hashing_algorithm.rb', line 17

def @@j_api_type.accept?(obj)
  obj.class == HashingAlgorithm
end

+ (Object) j_api_type



26
27
28
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/hashing_algorithm.rb', line 26

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



29
30
31
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/hashing_algorithm.rb', line 29

def self.j_class
  Java::IoVertxExtAuth::HashingAlgorithm.java_class
end

+ (Object) unwrap(obj)



23
24
25
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/hashing_algorithm.rb', line 23

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



20
21
22
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/hashing_algorithm.rb', line 20

def @@j_api_type.wrap(obj)
  HashingAlgorithm.new(obj)
end

Instance Method Details

- (String) id

return the symbolic name for the algorithm

Returns:

  • (String)
    short id e.g.: sha512.

Raises:

  • (ArgumentError)


34
35
36
37
38
39
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/hashing_algorithm.rb', line 34

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

- (true, false) needs_separator?

Should the encoded string use the default separator to split fields.

Returns:

  • (true, false)
    true by default.

Raises:

  • (ArgumentError)


50
51
52
53
54
55
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/hashing_algorithm.rb', line 50

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

- (Set<String>) params

return the list of param names required for this algorithm.

Returns:

  • (Set<String>)
    set of param names.

Raises:

  • (ArgumentError)


42
43
44
45
46
47
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/hashing_algorithm.rb', line 42

def params
  if !block_given?
    return ::Vertx::Util::Utils.to_set(@j_del.java_method(:params, []).call()).map! { |elt| elt }
  end
  raise ArgumentError, "Invalid arguments when calling params()"
end