Class DefaultSensitiveStringCodec

  • All Implemented Interfaces:
    SensitiveDataCodec<java.lang.String>

    public class DefaultSensitiveStringCodec
    extends java.lang.Object
    implements SensitiveDataCodec<java.lang.String>
    A DefaultSensitiveDataCodec The default implementation of SensitiveDataCodec. This class is used when the user indicates in the config file to use a masked password but doesn't give a codec implementation. It supports one-way hash (digest) and two-way (encrypt-decrpt) algorithms The two-way uses "Blowfish" algorithm The one-way uses "PBKDF2" hash algorithm
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String decode​(java.lang.Object secret)  
      java.lang.String encode​(java.lang.Object secret)  
      void init​(java.util.Map<java.lang.String,​java.lang.String> params)  
      static void main​(java.lang.String[] args)
      This main class is as documented on configuration-index.md, where the user can mask the password here.
      boolean verify​(char[] inputValue, java.lang.String storedValue)  
      • Methods inherited from class java.lang.Object

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

      • DefaultSensitiveStringCodec

        public DefaultSensitiveStringCodec()
    • Method Detail

      • decode

        public java.lang.String decode​(java.lang.Object secret)
                                throws java.lang.Exception
        Specified by:
        decode in interface SensitiveDataCodec<java.lang.String>
        Throws:
        java.lang.Exception
      • encode

        public java.lang.String encode​(java.lang.Object secret)
                                throws java.lang.Exception
        Specified by:
        encode in interface SensitiveDataCodec<java.lang.String>
        Throws:
        java.lang.Exception
      • init

        public void init​(java.util.Map<java.lang.String,​java.lang.String> params)
                  throws java.lang.Exception
        Specified by:
        init in interface SensitiveDataCodec<java.lang.String>
        Throws:
        java.lang.Exception
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        This main class is as documented on configuration-index.md, where the user can mask the password here. *
        Parameters:
        args -
        Throws:
        java.lang.Exception
      • verify

        public boolean verify​(char[] inputValue,
                              java.lang.String storedValue)
        Specified by:
        verify in interface SensitiveDataCodec<java.lang.String>