diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f8fc89e..eb1aa18 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,7 +13,7 @@ jobs: - name: Install Nargo uses: noir-lang/noirup@v0.1.3 with: - toolchain: 0.19.2 + toolchain: 0.19.4 - name: Run nargo test run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 85abd90..773530b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.1.2](https://github.com/zkworks-xyz/noir-base64/commits/v0.1.2...v0.1.0) (2024-01-03) + + +### Changes + +* adjust to left shift operation changes in Noir version `0.19.3` - change `std::wrapping_shift_left` to `<<` ([#11](https://github.com/zkworks-xyz/noir-base64/issues/11)) + ## [0.1.1](https://github.com/zkworks-xyz/noir-base64/commits/v0.1.1) (2023-11-28) diff --git a/Nargo.toml b/Nargo.toml index 70ae063..c2b25d1 100644 --- a/Nargo.toml +++ b/Nargo.toml @@ -2,6 +2,6 @@ name = "base64" type = "lib" authors = [""] -compiler_version = ">=0.19.2" +compiler_version = ">=0.19.4" [dependencies] diff --git a/src/lib.nr b/src/lib.nr index fb90ca2..9451083 100644 --- a/src/lib.nr +++ b/src/lib.nr @@ -46,20 +46,20 @@ fn convert_chunk(input: [u8; N], url_safe: bool) -> [u8; 4] { let mut result = [64; 4]; let input0_first6 = input[0] >> 2; - let input0_last2 = std::wrapping_shift_left(input[0], 6) >> 2; + let input0_last2 = (input[0] << 6) >> 2; result[0] = input0_first6; result[1] = input0_last2; if input_len > 1 { let input1_first4 = input[1] >> 4; - let input1_last4 = std::wrapping_shift_left(input[1], 4) >> 2; + let input1_last4 = (input[1] << 4) >> 2; result[1] += input1_first4; result[2] = input1_last4; if input_len > 2 { let input2_first2 = input[2] >> 6; - let input2_last6 = std::wrapping_shift_left(input[2], 2) >> 2; + let input2_last6 = (input[2] << 2) >> 2; result[2] += input2_first2; result[3] = input2_last6;