Class: Gitlab::Styles::Rubocop::Cop::Fips::SHA1

Inherits:
RuboCop::Cop::Base
  • Object
show all
Includes:
Common::BannedConstants
Defined in:
lib/gitlab/styles/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 Common::BannedConstants

#autocorrect, #message_template, #replacements

Instance Method Summary collapse

Methods included from Common::BannedConstants

#on_const

Constructor Details

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

Returns a new instance of SHA1.



20
21
22
23
24
25
# File 'lib/gitlab/styles/rubocop/cop/fips/sha1.rb', line 20

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