Change access modifiers to 'protected internal'

(this is what I meant anyway by internal, didn't realize internal
allowed any access in the assembly)
This commit is contained in:
Lucas Nicodemus 2015-04-13 13:06:49 -06:00
parent 1f690440d0
commit 845c8c4b3d

View file

@ -368,7 +368,7 @@ namespace TShockAPI.DB
/// <summary>Upgrades a password to BCrypt, from an insecure hashing algorithm.</summary> /// <summary>Upgrades a password to BCrypt, from an insecure hashing algorithm.</summary>
/// <param name="password">string password - the raw user password (unhashed) to upgrade</param> /// <param name="password">string password - the raw user password (unhashed) to upgrade</param>
internal void upgradePasswordToBCrypt(string password) { protected internal void upgradePasswordToBCrypt(string password) {
// Save the old password, in the event that we have to revert changes. // Save the old password, in the event that we have to revert changes.
string oldpassword = this.Password; string oldpassword = this.Password;
@ -390,7 +390,7 @@ namespace TShockAPI.DB
/// <summary>Upgrades a password to the highest work factor available in the config.</summary> /// <summary>Upgrades a password to the highest work factor available in the config.</summary>
/// <param name="password">string password - the raw user password (unhashed) to upgrade</param> /// <param name="password">string password - the raw user password (unhashed) to upgrade</param>
internal void upgradePasswordWorkFactor(string password) { protected internal void upgradePasswordWorkFactor(string password) {
// If the destination work factor is not greater, we won't upgrade it or re-hash it // If the destination work factor is not greater, we won't upgrade it or re-hash it
int currentWorkFactor = Convert.ToInt32((this.Password.Split('$')[2])); int currentWorkFactor = Convert.ToInt32((this.Password.Split('$')[2]));
@ -423,7 +423,7 @@ namespace TShockAPI.DB
/// <summary> /// <summary>
/// A dictionary of hashing algortihms and an implementation object. /// A dictionary of hashing algortihms and an implementation object.
/// </summary> /// </summary>
internal readonly Dictionary<string, Func<HashAlgorithm>> HashTypes = new Dictionary<string, Func<HashAlgorithm>> protected internal readonly Dictionary<string, Func<HashAlgorithm>> HashTypes = new Dictionary<string, Func<HashAlgorithm>>
{ {
{"sha512", () => new SHA512Managed()}, {"sha512", () => new SHA512Managed()},
{"sha256", () => new SHA256Managed()}, {"sha256", () => new SHA256Managed()},
@ -438,7 +438,7 @@ namespace TShockAPI.DB
/// </summary> /// </summary>
/// <param name="bytes">bytes to hash</param> /// <param name="bytes">bytes to hash</param>
/// <returns>string hash</returns> /// <returns>string hash</returns>
internal string hashPassword(byte[] bytes) protected internal string hashPassword(byte[] bytes)
{ {
if (bytes == null) if (bytes == null)
throw new NullReferenceException("bytes"); throw new NullReferenceException("bytes");
@ -458,7 +458,7 @@ namespace TShockAPI.DB
/// </summary> /// </summary>
/// <param name="password">string to hash</param> /// <param name="password">string to hash</param>
/// <returns>string hash</returns> /// <returns>string hash</returns>
internal string hashPassword(string password) protected internal string hashPassword(string password)
{ {
if (string.IsNullOrEmpty(password) || password == "non-existant password") if (string.IsNullOrEmpty(password) || password == "non-existant password")
return null; return null;