Package 

Object PIIHasher


  • 
    public class PIIHasher
    
                        

    Deterministic SHA-256 hashing for PII fields (email, phone number) so that sensitive data stored in SharedPreferences is not readable in plain text on rooted devices or via ADB backup.

    The hash is hex-encoded and always 64 characters long.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static PIIHasher INSTANCE
    • Method Summary

      Modifier and Type Method Description
      final String hash(String value) Returns the lowercase hex-encoded SHA-256 hash of value.
      final Boolean isHashed(String value) Returns true if value looks like a 64-char lowercase hex SHA-256 digest.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait