Class: Rubocop::Cop::Fips::SHA1

Inherits:
RuboCop::Cop::Base
  • Object
show all
Includes:
Gitlab::Styles::Common::BannedConstants
Defined in:
lib/rubocop/cop/fips/sha1.rb

Constant Summary collapse

MESSAGE_TEMPLATE =
'SHA1 is likely to become non-compliant in the near future. Use %{replacement} instead.'
REPLACEMENTS =
{
  'OpenSSL::Digest::SHA1' => 'OpenSSL::Digest::SHA256',
  'Digest::SHA1' => 'OpenSSL::Digest::SHA256'
}.freeze

Instance Attribute Summary

Attributes included from Gitlab::Styles::Common::BannedConstants

#autocorrect, #message_template, #replacements

Instance Method Summary collapse

Methods included from Gitlab::Styles::Common::BannedConstants

#on_const

Constructor Details

#initialize(config = nil, options = nil) ⇒ SHA1

Returns a new instance of SHA1.



18
19
20
21
22
23
# File 'lib/rubocop/cop/fips/sha1.rb', line 18

def initialize(config = nil, options = nil)
  @message_template = MESSAGE_TEMPLATE
  @replacements = REPLACEMENTS
  @autocorrect = false
  super
end