Class HmacSha1SlotConfiguration

    • Constructor Detail

      • HmacSha1SlotConfiguration

        public HmacSha1SlotConfiguration​(byte[] secret)
        Creates a HMAC-SHA1 challenge-response configuration with default settings.
        Parameters:
        secret - the 20 bytes HMAC key to store
    • Method Detail

      • requireTouch

        public HmacSha1SlotConfiguration requireTouch​(boolean requireTouch)
        Whether or not to require a user presence check for calculating the response.
        Parameters:
        requireTouch - if true, any attempt to calculate a response will cause the YubiKey to require touch (default: false)
        Returns:
        the configuration for chaining
      • lt64

        public HmacSha1SlotConfiguration lt64​(boolean lt64)
        Whether or not challenges sent to this slot are less than 64 bytes long or not.
        Parameters:
        lt64 - if false, all challenges must be exactly 64 bytes long (default: true)
        Returns:
        the configuration for chaining
      • isSupportedBy

        public boolean isSupportedBy​(com.yubico.yubikit.core.Version version)
        Description copied from interface: SlotConfiguration
        Checks the configuration against a YubiKey firmware version to see if it is supported
        Specified by:
        isSupportedBy in interface SlotConfiguration
        Parameters:
        version - the firmware version to check against
        Returns:
        true if the given YubiKey version supports this configuration
      • serialApiVisible

        public T serialApiVisible​(boolean serialApiVisible)
      • serialUsbVisible

        public T serialUsbVisible​(boolean serialUsbVisible)
      • allowUpdate

        public T allowUpdate​(boolean allowUpdate)
      • dormant

        public T dormant​(boolean dormant)
        Makes the configuration dormant (hidden from use). A dormant configuration needs to be updated and the dormant bit removed to be used.
        Parameters:
        dormant - if true, the configuration cannot be used
        Returns:
        the configuration for chaining
      • invertLed

        public T invertLed​(boolean invertLed)
        Inverts the behaviour of the led on the YubiKey.
        Parameters:
        invertLed - if true, the LED behavior is inverted
        Returns:
        the configuration for chaining
      • protectSlot2

        public T protectSlot2​(boolean protectSlot2)
        When set for slot 1, access to modify slot 2 is blocked (even if slot 2 is empty).
        Parameters:
        protectSlot2 - If true, slot 2 cannot be modified.
        Returns:
        the configuration for chaining