Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Scrypt.NET Hashing doesn't work with unity?

Discussion in 'Editor & General Support' started by theo9743, Mar 17, 2020.

  1. theo9743

    theo9743

    Joined:
    Feb 18, 2020
    Posts:
    12
    Hi there and apologies if I'm posting in the wrong place,

    I'm trying to Hash passwords of my user's before storing them in my Database, and I've decided to use Scrypt as it seems to be the most appropriate for my use. It works fine when working in a console application, but when I add it to my unity project file and open unity, it tells me the namespace can't be found! If anyone knows anything about this I would gladly appreciate some input and I can't find anything online.

    Thanks

    Code snippet;


    using Scrypt;

    public class HashSaltScript
    {


    // Start is called before the first frame update
    void Start()
    {
    ScryptEncoder encoders = new ScryptEncoder();

    string hashedPassword = encoders.Encode("Test String");

    Debug.Log(hashedPassword);

    }

    // Update is called once per frame
    void Update()
    {

    }
    }
     
    Last edited: Mar 17, 2020
  2. theo9743

    theo9743

    Joined:
    Feb 18, 2020
    Posts:
    12