using UnityEngine;

namespace Darkmatter.Libs.PlayerPrefs
{
    [CreateAssetMenu(
        fileName = "ProtectedPlayerPrefsSettings",
        menuName = "Darkmatter/Libs/Protected PlayerPrefs Settings")]
    public class ProtectedPlayerPrefsSettings : ScriptableObject
    {
        [SerializeField] private string _hashedPassphrase;

        public string HashedPassphrase => _hashedPassphrase;

        public bool HasConfiguredHash => !string.IsNullOrWhiteSpace(_hashedPassphrase);

        public void SetHashedPassphrase(string hashedPassphrase)
        {
            _hashedPassphrase = (hashedPassphrase ?? string.Empty).Trim();
        }
    }
}
