Skip to content

Commit

Permalink
fix gcm win
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin committed Jun 17, 2024
1 parent 4354880 commit e2b0fe8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"linux": {
"upstream": [
{
"name": "aws-lc",
"revision": "97ee225a8b302fc58da6faad3046e1534c6230d7"
"name": "aws-lc"
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions source/windows/bcrypt_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ static int s_aes_gcm_encrypt(
wait til next time or for the finalize call. */
if (working_buffer.len > AWS_AES_256_CIPHER_BLOCK_SIZE) {
size_t offset = working_buffer.len % AWS_AES_256_CIPHER_BLOCK_SIZE;
size_t seek_to = working_buffer.len - (AWS_AES_256_CIPHER_BLOCK_SIZE + offset);
size_t seek_to = working_buffer.len - offset;
struct aws_byte_cursor working_buf_cur = aws_byte_cursor_from_buf(&working_buffer);
struct aws_byte_cursor working_slice = aws_byte_cursor_advance(&working_buf_cur, seek_to);
/* this is just here to make it obvious. The previous line advanced working_buf_cur to where the
Expand Down Expand Up @@ -644,7 +644,7 @@ static int s_aes_gcm_decrypt(
wait til next time or for the finalize call. */
if (working_buffer.len > AWS_AES_256_CIPHER_BLOCK_SIZE) {
size_t offset = working_buffer.len % AWS_AES_256_CIPHER_BLOCK_SIZE;
size_t seek_to = working_buffer.len - (AWS_AES_256_CIPHER_BLOCK_SIZE + offset);
size_t seek_to = working_buffer.len - offset;
struct aws_byte_cursor working_buf_cur = aws_byte_cursor_from_buf(&working_buffer);
struct aws_byte_cursor working_slice = aws_byte_cursor_advance(&working_buf_cur, seek_to);
/* this is just here to make it obvious. The previous line advanced working_buf_cur to where the
Expand Down

0 comments on commit e2b0fe8

Please sign in to comment.