diff options
author | Shubhendra Singh Chauhan <withshubh@gmail.com> | 2021-02-01 01:56:09 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-31 21:26:09 +0100 |
commit | c8d11b8bdb97a1a2f8aaf5deca5f1c6c7c0d2688 (patch) | |
tree | 3b3552d07969abc85bac41b1ac5ff7fb8e2573a7 /spec/lib/activitypub | |
parent | 3efa0c54b6656fba189baab0857e60c0bc4f3c7d (diff) |
Fixed code quality issues (#15541)
* Added .deepsource.toml * Removed bad use of `alias` * Fixed operand order in the binary expression * Prefixed unused method arguments with an underscore * Replaced the old OpenSSL algorithmic constants with the newer strings initializers. * Removed unnecessary UTF-8 encoding comment
Diffstat (limited to 'spec/lib/activitypub')
-rw-r--r-- | spec/lib/activitypub/linked_data_signature_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/activitypub/linked_data_signature_spec.rb b/spec/lib/activitypub/linked_data_signature_spec.rb index 1f413eec9..2222c46fb 100644 --- a/spec/lib/activitypub/linked_data_signature_spec.rb +++ b/spec/lib/activitypub/linked_data_signature_spec.rb @@ -81,6 +81,6 @@ RSpec.describe ActivityPub::LinkedDataSignature do options_hash = Digest::SHA256.hexdigest(canonicalize(options.merge('@context' => ActivityPub::LinkedDataSignature::CONTEXT))) document_hash = Digest::SHA256.hexdigest(canonicalize(document)) to_be_verified = options_hash + document_hash - Base64.strict_encode64(from_account.keypair.sign(OpenSSL::Digest::SHA256.new, to_be_verified)) + Base64.strict_encode64(from_account.keypair.sign(OpenSSL::Digest.new('SHA256'), to_be_verified)) end end |