hctr2 0.2.0

An implementation of the length-preserving encryption HCTR2 algorithm.
Documentation
name: hctr2

on:
  pull_request:
  push:
    branches: main

env:
  CARGO_INCREMENTAL: 0
  RUSTFLAGS: "-Dwarnings"

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - nightly
        target:
          - x86_64-unknown-linux-gnu
          - armv7a-none-eabi
          - thumbv7em-none-eabi
          - wasm32-unknown-unknown
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          target: ${{ matrix.target }}
          override: true
          profile: minimal
      - run: cargo build --no-default-features --release --target ${{ matrix.target }}

  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        include:
          # 32-bit Linux
          - target: i686-unknown-linux-gnu
            rust: nightly
            deps: sudo apt update && sudo apt install gcc-multilib

          # 64-bit Linux
          - target: x86_64-unknown-linux-gnu
            rust: nightly
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          target: ${{ matrix.target }}
          override: true
          profile: minimal
      - run: ${{ matrix.deps }}
      - run: cargo test --target ${{ matrix.target }} --release
      - run: cargo test --target ${{ matrix.target }} --release --features zeroize
      - run: cargo test --target ${{ matrix.target }} --release --all-features
      - run: cargo build --target ${{ matrix.target }} --benches