Class SaltEncodingPolicy

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String generateUserSalt​(java.lang.String uid)
      Generates salt based on user id
      java.lang.String getSystemSpecificSalt()
      Returns system specific salt
      boolean isSaltedAlready​(java.lang.String password)
      Checks if the submitted string starts with the return value of isSaltedAlready(String).
      java.lang.String saltify​(java.lang.String uid, java.lang.String password)
      Return password with added salt
      void setSalt​(java.lang.String salt)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SaltEncodingPolicy

        public SaltEncodingPolicy()
    • Method Detail

      • generateUserSalt

        public java.lang.String generateUserSalt​(java.lang.String uid)
        Generates salt based on user id
        Parameters:
        uid - user id
        Returns:
        user-salt
      • saltify

        public java.lang.String saltify​(java.lang.String uid,
                                        java.lang.String password)
        Return password with added salt
        Parameters:
        uid - user id
        password - password to be salted
        Returns:
        salted password
      • isSaltedAlready

        public boolean isSaltedAlready​(java.lang.String password)
        Checks if the submitted string starts with the return value of isSaltedAlready(String).
        Parameters:
        password - the submitted password
        Returns:
        true if the submitted string starts with the value of of isSaltedAlready(String).
      • getSystemSpecificSalt

        public java.lang.String getSystemSpecificSalt()
        Returns system specific salt
        Returns:
        system specific salt
      • setSalt

        public void setSalt​(java.lang.String salt)