alias_group5:
  - alias: 'hash_algo=sha2_256'
svc_chains:
  - svc_chain:
      idx: 1
      name: "Hash full"
      input:
        pattern: aaabbbaaabbb
        len: '$2block'
      ops:
        - hash:
            algo_type: '$hash_algo'
            flags: 0
            output_file: '%chain_id%_hash_full.bin'
svc_chains:
  - svc_chain:
      idx: 2
      name: "Hash per-block"
      input:
        pattern: aaabbbaaabbb
        len: '$2block'
      ops:
        - hash:
            algo_type: '$hash_algo'
            flags: 'per_block'
            output_file: '%chain_id%_hash_per_block.bin'
svc_chains:
  - svc_chain:
      idx: 3
      name: "Hash large input per-block"
      input:
        pattern: aaabbbaaabbb
        len: '$16block'
      ops:
        - hash:
            algo_type: '$hash_algo'
            flags: 'per_block'
            output_file: '%chain_id%_hash_large_per_block.bin'

tests:
  - test:
      idx: 1
      name: "Hash full"
      svc_chains: 1
      repeat: '$iter_low'
      validations:
        - size_compare:
            idx: 1
            file1: '%chain_id%_hash_full.bin'
            val: 64
  - test:
      idx: 2
      name: "Hash per-block"
      svc_chains: 2
      repeat: '$iter_low'
      validations:
        - size_compare:
            idx: 1
            file1: '%chain_id%_hash_per_block.bin'
            val: 128
  - test:
      idx: 3
      name: "Hash large input per-block"
      svc_chains: 3
      repeat: '$iter_low'
      validations:
        - size_compare:
            idx: 1
            file1: '%chain_id%_hash_large_per_block.bin'
            val: 1024
