Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2017-03-15 19:21:21 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2017-03-16 15:02:09 +0300
commit03c249026e620125dbf2a0d4deeb1c80e34e7151 (patch)
tree1041eb22ff59fd8c7d407de2190c35a8532f5ab7 /mcs/class/System.Security
parentf376e49d9520870f269e844d570c0a80c3a3fc15 (diff)
[System.Security] Rename method parameters to match .NET contract
Diffstat (limited to 'mcs/class/System.Security')
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignedCms.cs20
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Xml/CipherReference.cs4
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Xml/DataReference.cs4
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedReference.cs4
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedXml.cs84
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionMethod.cs4
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionProperty.cs4
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoEncryptedKey.cs4
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoRetrievalMethod.cs4
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.Xml/KeyReference.cs4
-rw-r--r--mcs/class/System.Security/System.Security.Permissions/DataProtectionPermission.cs10
11 files changed, 73 insertions, 73 deletions
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignedCms.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignedCms.cs
index 52ddd84da3d..0dbbbdabad5 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignedCms.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignedCms.cs
@@ -55,18 +55,18 @@ namespace System.Security.Cryptography.Pkcs {
_info = new SignerInfoCollection ();
}
- public SignedCms (ContentInfo content)
- : this (content, false)
+ public SignedCms (ContentInfo contentInfo)
+ : this (contentInfo, false)
{
}
- public SignedCms (ContentInfo content, bool detached)
+ public SignedCms (ContentInfo contentInfo, bool detached)
: this ()
{
- if (content == null)
- throw new ArgumentNullException ("content");
+ if (contentInfo == null)
+ throw new ArgumentNullException ("contentInfo");
- _content = content;
+ _content = contentInfo;
_detached = detached;
}
@@ -75,14 +75,14 @@ namespace System.Security.Cryptography.Pkcs {
_type = signerIdentifierType;
}
- public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo content)
- : this (content, false)
+ public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo contentInfo)
+ : this (contentInfo, false)
{
_type = signerIdentifierType;
}
- public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo content, bool detached)
- : this (content, detached)
+ public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo contentInfo, bool detached)
+ : this (contentInfo, detached)
{
_type = signerIdentifierType;
}
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/CipherReference.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/CipherReference.cs
index b927fa2b71b..9c83f3bb0ab 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/CipherReference.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/CipherReference.cs
@@ -46,8 +46,8 @@ namespace System.Security.Cryptography.Xml {
{
}
- public CipherReference (string uri, TransformChain tc)
- : base (uri, tc)
+ public CipherReference (string uri, TransformChain transformChain)
+ : base (uri, transformChain)
{
}
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/DataReference.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/DataReference.cs
index 23fedd437a1..c3aa9366681 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/DataReference.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/DataReference.cs
@@ -48,8 +48,8 @@ namespace System.Security.Cryptography.Xml {
ReferenceType = XmlEncryption.ElementNames.DataReference;
}
- public DataReference (string uri, TransformChain tc)
- : base (uri, tc)
+ public DataReference (string uri, TransformChain transformChain)
+ : base (uri, transformChain)
{
ReferenceType = XmlEncryption.ElementNames.DataReference;
}
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedReference.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedReference.cs
index 04f3799f8cc..e748523cbc4 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedReference.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedReference.cs
@@ -55,11 +55,11 @@ namespace System.Security.Cryptography.Xml {
TransformChain = new TransformChain ();
}
- protected EncryptedReference (string uri, TransformChain tc)
+ protected EncryptedReference (string uri, TransformChain transformChain)
: this ()
{
Uri = uri;
- TransformChain = tc;
+ TransformChain = transformChain;
}
#endregion // Constructors
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedXml.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedXml.cs
index 6dde9199a2a..362f973e356 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedXml.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedXml.cs
@@ -138,19 +138,19 @@ namespace System.Security.Cryptography.Xml {
keyNameMapping.Clear ();
}
- public byte[] DecryptData (EncryptedData encryptedData, SymmetricAlgorithm symAlg)
+ public byte[] DecryptData (EncryptedData encryptedData, SymmetricAlgorithm symmetricAlgorithm)
{
if (encryptedData == null)
throw new ArgumentNullException ("encryptedData");
- if (symAlg == null)
- throw new ArgumentNullException ("symAlg");
+ if (symmetricAlgorithm == null)
+ throw new ArgumentNullException ("symmetricAlgorithm");
- PaddingMode bak = symAlg.Padding;
+ PaddingMode bak = symmetricAlgorithm.Padding;
try {
- symAlg.Padding = Padding;
- return Transform (encryptedData.CipherData.CipherValue, symAlg.CreateDecryptor (), symAlg.BlockSize / 8, true);
+ symmetricAlgorithm.Padding = Padding;
+ return Transform (encryptedData.CipherData.CipherValue, symmetricAlgorithm.CreateDecryptor (), symmetricAlgorithm.BlockSize / 8, true);
} finally {
- symAlg.Padding = bak;
+ symmetricAlgorithm.Padding = bak;
}
}
@@ -186,25 +186,25 @@ namespace System.Security.Cryptography.Xml {
return DecryptKey (encryptedKey.CipherData.CipherValue, (SymmetricAlgorithm) keyAlg);
}
- public static byte[] DecryptKey (byte[] keyData, SymmetricAlgorithm symAlg)
+ public static byte[] DecryptKey (byte[] keyData, SymmetricAlgorithm symmetricAlgorithm)
{
if (keyData == null)
throw new ArgumentNullException ("keyData");
- if (symAlg == null)
- throw new ArgumentNullException ("symAlg");
+ if (symmetricAlgorithm == null)
+ throw new ArgumentNullException ("symmetricAlgorithm");
- if (symAlg is TripleDES)
- return SymmetricKeyWrap.TripleDESKeyWrapDecrypt (symAlg.Key, keyData);
- if (symAlg is Rijndael)
- return SymmetricKeyWrap.AESKeyWrapDecrypt (symAlg.Key, keyData);
+ if (symmetricAlgorithm is TripleDES)
+ return SymmetricKeyWrap.TripleDESKeyWrapDecrypt (symmetricAlgorithm.Key, keyData);
+ if (symmetricAlgorithm is Rijndael)
+ return SymmetricKeyWrap.AESKeyWrapDecrypt (symmetricAlgorithm.Key, keyData);
throw new CryptographicException ("The specified cryptographic transform is not supported.");
}
[MonoTODO ("Test this.")]
- public static byte[] DecryptKey (byte[] keyData, RSA rsa, bool fOAEP)
+ public static byte[] DecryptKey (byte[] keyData, RSA rsa, bool useOAEP)
{
AsymmetricKeyExchangeDeformatter deformatter = null;
- if (fOAEP)
+ if (useOAEP)
deformatter = new RSAOAEPKeyExchangeDeformatter (rsa);
else
deformatter = new RSAPKCS1KeyExchangeDeformatter (rsa);
@@ -254,19 +254,19 @@ namespace System.Security.Cryptography.Xml {
throw new NotImplementedException ();
}
- public byte[] EncryptData (byte[] plainText, SymmetricAlgorithm symAlg)
+ public byte[] EncryptData (byte[] plaintext, SymmetricAlgorithm symmetricAlgorithm)
{
- if (plainText == null)
- throw new ArgumentNullException ("plainText");
- if (symAlg == null)
- throw new ArgumentNullException ("symAlg");
+ if (plaintext == null)
+ throw new ArgumentNullException ("plaintext");
+ if (symmetricAlgorithm == null)
+ throw new ArgumentNullException ("symmetricAlgorithm");
- PaddingMode bak = symAlg.Padding;
+ PaddingMode bak = symmetricAlgorithm.Padding;
try {
- symAlg.Padding = Padding;
- return EncryptDataCore (plainText, symAlg);
+ symmetricAlgorithm.Padding = Padding;
+ return EncryptDataCore (plaintext, symmetricAlgorithm);
} finally {
- symAlg.Padding = bak;
+ symmetricAlgorithm.Padding = bak;
}
}
@@ -289,37 +289,37 @@ namespace System.Security.Cryptography.Xml {
return output;
}
- public byte[] EncryptData (XmlElement inputElement, SymmetricAlgorithm symAlg, bool content)
+ public byte[] EncryptData (XmlElement inputElement, SymmetricAlgorithm symmetricAlgorithm, bool content)
{
if (inputElement == null)
throw new ArgumentNullException ("inputElement");
if (content)
- return EncryptData (Encoding.GetBytes (inputElement.InnerXml), symAlg);
+ return EncryptData (Encoding.GetBytes (inputElement.InnerXml), symmetricAlgorithm);
else
- return EncryptData (Encoding.GetBytes (inputElement.OuterXml), symAlg);
+ return EncryptData (Encoding.GetBytes (inputElement.OuterXml), symmetricAlgorithm);
}
- public static byte[] EncryptKey (byte[] keyData, SymmetricAlgorithm symAlg)
+ public static byte[] EncryptKey (byte[] keyData, SymmetricAlgorithm symmetricAlgorithm)
{
if (keyData == null)
throw new ArgumentNullException ("keyData");
- if (symAlg == null)
- throw new ArgumentNullException ("symAlg");
+ if (symmetricAlgorithm == null)
+ throw new ArgumentNullException ("symmetricAlgorithm");
- if (symAlg is TripleDES)
- return SymmetricKeyWrap.TripleDESKeyWrapEncrypt (symAlg.Key, keyData);
- if (symAlg is Rijndael)
- return SymmetricKeyWrap.AESKeyWrapEncrypt (symAlg.Key, keyData);
+ if (symmetricAlgorithm is TripleDES)
+ return SymmetricKeyWrap.TripleDESKeyWrapEncrypt (symmetricAlgorithm.Key, keyData);
+ if (symmetricAlgorithm is Rijndael)
+ return SymmetricKeyWrap.AESKeyWrapEncrypt (symmetricAlgorithm.Key, keyData);
throw new CryptographicException ("The specified cryptographic transform is not supported.");
}
[MonoTODO ("Test this.")]
- public static byte[] EncryptKey (byte[] keyData, RSA rsa, bool fOAEP)
+ public static byte[] EncryptKey (byte[] keyData, RSA rsa, bool useOAEP)
{
AsymmetricKeyExchangeFormatter formatter = null;
- if (fOAEP)
+ if (useOAEP)
formatter = new RSAOAEPKeyExchangeFormatter (rsa);
else
formatter = new RSAPKCS1KeyExchangeFormatter (rsa);
@@ -402,25 +402,25 @@ namespace System.Security.Cryptography.Xml {
throw new ArgumentException ("keyAlg");
}
- public virtual byte[] GetDecryptionIV (EncryptedData encryptedData, string symAlgUri)
+ public virtual byte[] GetDecryptionIV (EncryptedData encryptedData, string symmetricAlgorithmUri)
{
if (encryptedData == null)
throw new ArgumentNullException ("encryptedData");
- SymmetricAlgorithm symAlg = GetAlgorithm (symAlgUri);
+ SymmetricAlgorithm symAlg = GetAlgorithm (symmetricAlgorithmUri);
byte[] iv = new Byte [symAlg.BlockSize / 8];
Buffer.BlockCopy (encryptedData.CipherData.CipherValue, 0, iv, 0, iv.Length);
return iv;
}
- public virtual SymmetricAlgorithm GetDecryptionKey (EncryptedData encryptedData, string symAlgUri)
+ public virtual SymmetricAlgorithm GetDecryptionKey (EncryptedData encryptedData, string symmetricAlgorithmUri)
{
if (encryptedData == null)
throw new ArgumentNullException ("encryptedData");
- if (symAlgUri == null)
+ if (symmetricAlgorithmUri == null)
return null;
- SymmetricAlgorithm symAlg = GetAlgorithm (symAlgUri);
+ SymmetricAlgorithm symAlg = GetAlgorithm (symmetricAlgorithmUri);
symAlg.IV = GetDecryptionIV (encryptedData, encryptedData.EncryptionMethod.KeyAlgorithm);
KeyInfo keyInfo = encryptedData.KeyInfo;
foreach (KeyInfoClause clause in keyInfo) {
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionMethod.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionMethod.cs
index 91815a19a30..cd68158bf0f 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionMethod.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionMethod.cs
@@ -48,9 +48,9 @@ namespace System.Security.Cryptography.Xml {
KeyAlgorithm = null;
}
- public EncryptionMethod (string strAlgorithm)
+ public EncryptionMethod (string algorithm)
{
- KeyAlgorithm = strAlgorithm;
+ KeyAlgorithm = algorithm;
}
#endregion // Constructors
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionProperty.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionProperty.cs
index eee49e6b6a0..ca662892da9 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionProperty.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionProperty.cs
@@ -47,9 +47,9 @@ namespace System.Security.Cryptography.Xml {
{
}
- public EncryptionProperty (XmlElement elemProp)
+ public EncryptionProperty (XmlElement elementProperty)
{
- LoadXml (elemProp);
+ LoadXml (elementProperty);
}
#endregion // Constructors
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoEncryptedKey.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoEncryptedKey.cs
index afd079b7dc2..62aa8afd3ca 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoEncryptedKey.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoEncryptedKey.cs
@@ -48,9 +48,9 @@ namespace System.Security.Cryptography.Xml {
{
}
- public KeyInfoEncryptedKey (EncryptedKey ek)
+ public KeyInfoEncryptedKey (EncryptedKey encryptedKey)
{
- EncryptedKey = ek;
+ EncryptedKey = encryptedKey;
}
#endregion // Constructors
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoRetrievalMethod.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoRetrievalMethod.cs
index 2732de63be7..532ba5ca2ce 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoRetrievalMethod.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoRetrievalMethod.cs
@@ -49,10 +49,10 @@ namespace System.Security.Cryptography.Xml {
URI = strUri;
}
- public KeyInfoRetrievalMethod (string strUri, string strType)
+ public KeyInfoRetrievalMethod (string strUri, string typeName)
: this (strUri)
{
- Type = strType;
+ Type = typeName;
}
[ComVisible (false)]
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyReference.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyReference.cs
index 2fe171e72f4..ba33bf25b32 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyReference.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyReference.cs
@@ -48,8 +48,8 @@ namespace System.Security.Cryptography.Xml {
ReferenceType = XmlEncryption.ElementNames.KeyReference;
}
- public KeyReference (string uri, TransformChain tc)
- : base (uri, tc)
+ public KeyReference (string uri, TransformChain transformChain)
+ : base (uri, transformChain)
{
ReferenceType = XmlEncryption.ElementNames.KeyReference;
}
diff --git a/mcs/class/System.Security/System.Security.Permissions/DataProtectionPermission.cs b/mcs/class/System.Security/System.Security.Permissions/DataProtectionPermission.cs
index e36b30e12b2..43560cd40cf 100644
--- a/mcs/class/System.Security/System.Security.Permissions/DataProtectionPermission.cs
+++ b/mcs/class/System.Security/System.Security.Permissions/DataProtectionPermission.cs
@@ -45,10 +45,10 @@ namespace System.Security.Permissions {
_flags = DataProtectionPermissionFlags.AllFlags;
}
- public DataProtectionPermission (DataProtectionPermissionFlags flags)
+ public DataProtectionPermission (DataProtectionPermissionFlags flag)
{
// reuse validation by the Flags property
- Flags = flags;
+ Flags = flag;
}
@@ -114,15 +114,15 @@ namespace System.Security.Permissions {
return ((_flags & ~dp._flags) == 0);
}
- public override void FromXml (SecurityElement e)
+ public override void FromXml (SecurityElement securityElement)
{
// General validation in CodeAccessPermission
- PermissionHelper.CheckSecurityElement (e, "e", version, version);
+ PermissionHelper.CheckSecurityElement (securityElement, "securityElement", version, version);
// Note: we do not (yet) care about the return value
// as we only accept version 1 (min/max values)
_flags = (DataProtectionPermissionFlags) Enum.Parse (
- typeof (DataProtectionPermissionFlags), e.Attribute ("Flags"));
+ typeof (DataProtectionPermissionFlags), securityElement.Attribute ("Flags"));
}
public override SecurityElement ToXml ()