Class TinkFipsUtil


  • public final class TinkFipsUtil
    extends java.lang.Object
    Static methods for checking if Tink was built in FIPS mode and to check for algorithm compatibility.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean fipsModuleAvailable()  
      static void setFipsRestricted()
      Sets the binary to FIPS-only restricted mode.
      static void unsetFipsRestricted()
      This method is only exposed for tests and should not be used to disable the FIPS restrictions.
      static boolean useOnlyFips()  
      • Methods inherited from class java.lang.Object

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

      • setFipsRestricted

        public static void setFipsRestricted()
                                      throws java.security.GeneralSecurityException
        Sets the binary to FIPS-only restricted mode. Fails if no FIPS-mode is available.
        Throws:
        java.security.GeneralSecurityException
      • unsetFipsRestricted

        public static void unsetFipsRestricted()
        This method is only exposed for tests and should not be used to disable the FIPS restrictions.
      • useOnlyFips

        public static boolean useOnlyFips()
      • fipsModuleAvailable

        public static boolean fipsModuleAvailable()