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)


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

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

+ (Object) j_api_type



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

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



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

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

+ (Object) unwrap(obj)



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

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

+ (Object) wrap(obj)



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

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.


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

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

- (true, false) needsSeparator

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

Returns:

  • (true, false)
    true by default.


36
37
38
39
40
41
42
43
44
45
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/hashing_algorithm.rb', line 36

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

- (Set<String>) params

return the list of param names required for this algorithm.

Returns:

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


62
63
64
65
66
67
68
69
70
71
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/hashing_algorithm.rb', line 62

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