Class SCryptImplementation

  • All Implemented Interfaces:
    ICrypt

    public class SCryptImplementation
    extends Object
    implements ICrypt
    • Constructor Detail

      • SCryptImplementation

        public SCryptImplementation()
    • Method Detail

      • hash

        public String hash​(String str)
        Description copied from interface: ICrypt
        Creates hash of given string
        Specified by:
        hash in interface ICrypt
        Parameters:
        str - - string to calculate hash for
        Returns:
        hash of passed string
      • verify

        public boolean verify​(String str,
                              String hash)
        Description copied from interface: ICrypt
        Verify string passed is matches given hash
        Specified by:
        verify in interface ICrypt
        Parameters:
        str - - string to check hash for
        hash - - hash to compare
        Returns:
        true in case string matches hash, false otherwise
      • fallback

        public boolean fallback​(String str,
                                String hash)
        Description copied from interface: ICrypt
        Verify string passed is matches given hash (using fallback crypt mechanism)
        Specified by:
        fallback in interface ICrypt
        Parameters:
        str - - string to check hash for
        hash - - hash to compare
        Returns:
        true in case string matches hash, false otherwise