From 3e2b2200748cee72290192e19ed6d01144f21557 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 27 Aug 2018 19:57:45 -0400 Subject: [PATCH] rename all to PBKDF2_SHA256 --- src/Core/Models/Api/Request/Accounts/KdfRequestModel.cs | 2 +- src/Core/Models/Api/Request/Accounts/RegisterRequestModel.cs | 4 ++-- src/Core/Models/Table/User.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Core/Models/Api/Request/Accounts/KdfRequestModel.cs b/src/Core/Models/Api/Request/Accounts/KdfRequestModel.cs index 04b5529fa..5684d28c6 100644 --- a/src/Core/Models/Api/Request/Accounts/KdfRequestModel.cs +++ b/src/Core/Models/Api/Request/Accounts/KdfRequestModel.cs @@ -18,7 +18,7 @@ namespace Bit.Core.Models.Api { switch(Kdf.Value) { - case KdfType.PBKDF2: + case KdfType.PBKDF2_SHA256: if(KdfIterations.Value < 5000 || KdfIterations.Value > 1_000_000) { yield return new ValidationResult("KDF iterations must be between 5000 and 1000000."); diff --git a/src/Core/Models/Api/Request/Accounts/RegisterRequestModel.cs b/src/Core/Models/Api/Request/Accounts/RegisterRequestModel.cs index ef3109904..193a9ba68 100644 --- a/src/Core/Models/Api/Request/Accounts/RegisterRequestModel.cs +++ b/src/Core/Models/Api/Request/Accounts/RegisterRequestModel.cs @@ -33,7 +33,7 @@ namespace Bit.Core.Models.Api Name = Name, Email = Email, MasterPasswordHint = MasterPasswordHint, - Kdf = Kdf.GetValueOrDefault(KdfType.PBKDF2), + Kdf = Kdf.GetValueOrDefault(KdfType.PBKDF2_SHA256), KdfIterations = KdfIterations.GetValueOrDefault(5000) }; @@ -56,7 +56,7 @@ namespace Bit.Core.Models.Api { switch(Kdf.Value) { - case KdfType.PBKDF2: + case KdfType.PBKDF2_SHA256: if(KdfIterations.Value < 5000 || KdfIterations.Value > 1_000_000) { yield return new ValidationResult("KDF iterations must be between 5000 and 1000000."); diff --git a/src/Core/Models/Table/User.cs b/src/Core/Models/Table/User.cs index ea0860dee..31fedb450 100644 --- a/src/Core/Models/Table/User.cs +++ b/src/Core/Models/Table/User.cs @@ -39,7 +39,7 @@ namespace Bit.Core.Models.Table public string GatewayCustomerId { get; set; } public string GatewaySubscriptionId { get; set; } public string LicenseKey { get; set; } - public KdfType Kdf { get; set; } = KdfType.PBKDF2; + public KdfType Kdf { get; set; } = KdfType.PBKDF2_SHA256; public int KdfIterations { get; set; } = 5000; public DateTime CreationDate { get; internal set; } = DateTime.UtcNow; public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;