I don't have a security background, so I'm not sure on the best approach for this, I'm developing an android app which users will need to login to (all local). I'm going to store the password in a sharedPreference and found this. If I understand it correctly, it doesn't seem to be salting it, so I was thinking about adding a digest.update(byte[]) after the 'MessageDigest digest = MessageDigest.getInstance("SHA-256");' line. Is that a good way to do it? Or should I pass in base + salt to the hash as a parameter?
Also, is a salt + hash safe enough? Or is it better to just use an actual encryption function (the ones I'm looking at right now are bCrypt and pbkdf2)? Open to any recommendations.