class UseWeakCryptoAlgorithmsRule
Public Class Methods
AnalyzeTokens(tokens)
click to toggle source
# File lib/rules/use_weak_crypto_algorithms_rule.rb, line 12 def self.AnalyzeTokens(tokens) result = [] tokens.each do |token| token_value = token.value.downcase token_type = token.type.to_s if !token.next_token.nil? next_token_type = token.next_token.type.to_s end if (token_value =~ @poor_crypto_conf.value) && (next_token_type.eql? "LPAREN") result.append(Sin.new(SinType::WeakCryptoAlgorithm, token.line, token.column, token.line, token.column+token_value.length)) end end return result end