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:
parent
1f690440d0
commit
845c8c4b3d
1 changed files with 5 additions and 5 deletions
|
|
@ -368,7 +368,7 @@ namespace TShockAPI.DB
|
|||
|
||||
/// <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>
|
||||
internal void upgradePasswordToBCrypt(string password) {
|
||||
protected internal void upgradePasswordToBCrypt(string password) {
|
||||
// Save the old password, in the event that we have to revert changes.
|
||||
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>
|
||||
/// <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
|
||||
int currentWorkFactor = Convert.ToInt32((this.Password.Split('$')[2]));
|
||||
|
||||
|
|
@ -423,7 +423,7 @@ namespace TShockAPI.DB
|
|||
/// <summary>
|
||||
/// A dictionary of hashing algortihms and an implementation object.
|
||||
/// </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()},
|
||||
{"sha256", () => new SHA256Managed()},
|
||||
|
|
@ -438,7 +438,7 @@ namespace TShockAPI.DB
|
|||
/// </summary>
|
||||
/// <param name="bytes">bytes to hash</param>
|
||||
/// <returns>string hash</returns>
|
||||
internal string hashPassword(byte[] bytes)
|
||||
protected internal string hashPassword(byte[] bytes)
|
||||
{
|
||||
if (bytes == null)
|
||||
throw new NullReferenceException("bytes");
|
||||
|
|
@ -458,7 +458,7 @@ namespace TShockAPI.DB
|
|||
/// </summary>
|
||||
/// <param name="password">string to hash</param>
|
||||
/// <returns>string hash</returns>
|
||||
internal string hashPassword(string password)
|
||||
protected internal string hashPassword(string password)
|
||||
{
|
||||
if (string.IsNullOrEmpty(password) || password == "non-existant password")
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue