Class CounterUtil

java.lang.Object
io.getlime.security.powerauth.lib.cmd.util.CounterUtil

public class CounterUtil
extends java.lang.Object
Helper class for counter.
Author:
Roman Strobl, roman.strobl@wultra.com
  • Constructor Summary

    Constructors
    Constructor Description
    CounterUtil()  
  • Method Summary

    Modifier and Type Method Description
    static byte[] getCtrData​(BaseStepModel model, StepLogger stepLogger)
    Get counter data.
    static void incrementCounter​(BaseStepModel model)
    Increment counter value in step model.

    Methods inherited from class java.lang.Object

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

    • CounterUtil

      public CounterUtil()
  • Method Details

    • getCtrData

      public static byte[] getCtrData​(BaseStepModel model, StepLogger stepLogger)
      Get counter data. In activation version 2, numeric counter is converted to counter data. In version 3 the counter data is available in model.
      Parameters:
      model - Step model.
      stepLogger - Step logger.
      Returns:
      Counter data.
    • incrementCounter

      public static void incrementCounter​(BaseStepModel model)
      Increment counter value in step model. In version 2.0 and 2.1 only numeric counter is incremented. In version 3.0 the counter data is incremented using hash based counter, too.
      Parameters:
      model - Step model.