Class HashBasedCounter

java.lang.Object
io.getlime.security.powerauth.crypto.lib.generator.HashBasedCounter
All Implemented Interfaces:
Counter

public class HashBasedCounter extends Object implements Counter
Implementation of hash based counter.
Author:
Roman Strobl, roman.strobl@wultra.com
  • Constructor Details

    • HashBasedCounter

      public HashBasedCounter()
  • Method Details

    • init

      public byte[] init() throws CryptoProviderException
      Generate initial counter data.
      Specified by:
      init in interface Counter
      Returns:
      Initial counter data.
      Throws:
      CryptoProviderException - In case key cryptography provider is incorrectly initialized.
    • next

      public byte[] next(byte[] ctrData)
      Generate next counter data by hashing current counter data.
      Specified by:
      next in interface Counter
      Parameters:
      ctrData - Current counter data.
      Returns:
      Next counter data.