Normalize names of span inputs in crypto API
authorJeremy Barton <jbarton@microsoft.com>
Sat, 17 Feb 2018 02:56:31 +0000 (18:56 -0800)
committerGitHub <noreply@github.com>
Sat, 17 Feb 2018 02:56:31 +0000 (18:56 -0800)
commit62dab49536666849f4db0d87364cc5353fef255f
treea9a7433d7197c878d4826ca65d28e9ff2e2d5b7c
parent2c4921599f87bd923bebac296ceccc12d396950e
Normalize names of span inputs in crypto API

The asymmetric types operate on either hashed input, or unprocessed input.
The existing API tends to call hashed input "hash" (or "rgbHash" for older API),
and unprocessed input "data" (or "rgbData").

This change modifies the new (ReadOnly)Span-based methods to use "data"
and "hash" (as appropriate) instead of "source".  Particularly because the
hash-based methods in DSA do not contain the word Hash, making "source"
for CreateSignature ambiguous.

In the cases where the existing parameter was named "rgbHash" (et al) the
"rgb" was dropped in the (ReadOnly)Span variant, including in the cases
where the (ReadOnly)Span variant is a proper overload.

Commit migrated from https://github.com/dotnet/corefx/commit/c360ba27944379f8234ff3a14e30b05f1279bd8e
15 files changed:
src/libraries/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs
src/libraries/Common/src/System/Security/Cryptography/DSAOpenSsl.cs
src/libraries/Common/src/System/Security/Cryptography/DSASecurityTransforms.cs
src/libraries/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs
src/libraries/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs
src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs
src/libraries/Common/src/System/Security/Cryptography/RSACng.cs
src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs
src/libraries/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs
src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.netcoreapp.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/DSA.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/ECDsa.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RSA.cs
src/libraries/System.Security.Cryptography.Csp/src/System/Security/Cryptography/DSACryptoServiceProvider.Unix.cs
src/libraries/System.Security.Cryptography.Csp/src/System/Security/Cryptography/RSACryptoServiceProvider.Unix.cs