// namespace Microsoft.AspNet.Security.DataProtection { using System.Globalization; using System.Reflection; using System.Resources; internal static class Resources { private static readonly ResourceManager _resourceManager = new ResourceManager("Microsoft.AspNet.Security.DataProtection.Resources", typeof(Resources).GetTypeInfo().Assembly); /// /// An error occurred during a cryptographic operation. /// internal static string CryptCommon_GenericError { get { return GetString("CryptCommon_GenericError"); } } /// /// An error occurred during a cryptographic operation. /// internal static string FormatCryptCommon_GenericError() { return GetString("CryptCommon_GenericError"); } /// /// The provided buffer is of length {0} byte(s). It must instead be exactly {1} byte(s) in length. /// internal static string Common_BufferIncorrectlySized { get { return GetString("Common_BufferIncorrectlySized"); } } /// /// The provided buffer is of length {0} byte(s). It must instead be exactly {1} byte(s) in length. /// internal static string FormatCommon_BufferIncorrectlySized(object p0, object p1) { return string.Format(CultureInfo.CurrentCulture, GetString("Common_BufferIncorrectlySized"), p0, p1); } /// /// The payload was invalid. /// internal static string CryptCommon_PayloadInvalid { get { return GetString("CryptCommon_PayloadInvalid"); } } /// /// The payload was invalid. /// internal static string FormatCryptCommon_PayloadInvalid() { return GetString("CryptCommon_PayloadInvalid"); } /// /// Property {0} cannot be null or empty. /// internal static string Common_PropertyCannotBeNullOrEmpty { get { return GetString("Common_PropertyCannotBeNullOrEmpty"); } } /// /// Property {0} cannot be null or empty. /// internal static string FormatCommon_PropertyCannotBeNullOrEmpty(object p0) { return string.Format(CultureInfo.CurrentCulture, GetString("Common_PropertyCannotBeNullOrEmpty"), p0); } /// /// The provided payload could not be decrypted. Refer to the inner exception for more information. /// internal static string Common_DecryptionFailed { get { return GetString("Common_DecryptionFailed"); } } /// /// The provided payload could not be decrypted. Refer to the inner exception for more information. /// internal static string FormatCommon_DecryptionFailed() { return GetString("Common_DecryptionFailed"); } /// /// An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information. /// internal static string Common_EncryptionFailed { get { return GetString("Common_EncryptionFailed"); } } /// /// An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information. /// internal static string FormatCommon_EncryptionFailed() { return GetString("Common_EncryptionFailed"); } /// /// The key {0:B} was not found in the keyring. /// internal static string Common_KeyNotFound { get { return GetString("Common_KeyNotFound"); } } /// /// The key {0:B} was not found in the keyring. /// internal static string FormatCommon_KeyNotFound() { return GetString("Common_KeyNotFound"); } /// /// The key {0:B} has been revoked. /// internal static string Common_KeyRevoked { get { return GetString("Common_KeyRevoked"); } } /// /// The key {0:B} has been revoked. /// internal static string FormatCommon_KeyRevoked() { return GetString("Common_KeyRevoked"); } /// /// The provided payload was not protected with this protection provider. /// internal static string Common_NotAValidProtectedPayload { get { return GetString("Common_NotAValidProtectedPayload"); } } /// /// The provided payload was not protected with this protection provider. /// internal static string FormatCommon_NotAValidProtectedPayload() { return GetString("Common_NotAValidProtectedPayload"); } /// /// The protected payload cannot be decrypted because it was protected with a newer version of the protection provider. /// internal static string Common_PayloadProducedByNewerVersion { get { return GetString("Common_PayloadProducedByNewerVersion"); } } /// /// The protected payload cannot be decrypted because it was protected with a newer version of the protection provider. /// internal static string FormatCommon_PayloadProducedByNewerVersion() { return GetString("Common_PayloadProducedByNewerVersion"); } /// /// The payload expired at {0}. /// internal static string TimeLimitedDataProtector_PayloadExpired { get { return GetString("TimeLimitedDataProtector_PayloadExpired"); } } /// /// The payload expired at {0}. /// internal static string FormatTimeLimitedDataProtector_PayloadExpired(object p0) { return string.Format(CultureInfo.CurrentCulture, GetString("TimeLimitedDataProtector_PayloadExpired"), p0); } /// /// The purposes array cannot be null or empty and cannot contain null or empty elements. /// internal static string DataProtectionExtensions_NullPurposesArray { get { return GetString("DataProtectionExtensions_NullPurposesArray"); } } /// /// The purposes array cannot be null or empty and cannot contain null or empty elements. /// internal static string FormatDataProtectionExtensions_NullPurposesArray() { return GetString("DataProtectionExtensions_NullPurposesArray"); } private static string GetString(string name, params string[] formatterNames) { var value = _resourceManager.GetString(name); System.Diagnostics.Debug.Assert(value != null); if (formatterNames != null) { for (var i = 0; i < formatterNames.Length; i++) { value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}"); } } return value; } } }