| author | |
| committer | |
| log | b70c1ad89f96c49d9812655b53c05b690ea42be2 |
| tree | b05dbca6f8870d7bbd2890dcb4b075e780420ccf |
| parent | 3f1dead2fc5922b588fbfb108f421ca957d6934a |
Both methods had wrong parameter or return types that would cause
compilation failures.3 files changed, 9 insertions(+), 9 deletions(-)
lib/std/crypto/aes/aesni.zig+1-1| ... | @@ -312,7 +312,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { | ... | @@ -312,7 +312,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { |
| 312 | } | 312 | } |
| 313 | 313 | ||
| 314 | /// Apply the bitwise OR operation to the content of two block vectors. | 314 | /// Apply the bitwise OR operation to the content of two block vectors. |
| 315 | pub fn orBlocks(block_vec1: Self, block_vec2: Block) Self { | 315 | pub fn orBlocks(block_vec1: Self, block_vec2: Self) Self { |
| 316 | var out: Self = undefined; | 316 | var out: Self = undefined; |
| 317 | inline for (0..native_words) |i| { | 317 | inline for (0..native_words) |i| { |
| 318 | out.repr[i] = block_vec1.repr[i] | block_vec2.repr[i]; | 318 | out.repr[i] = block_vec1.repr[i] | block_vec2.repr[i]; |
lib/std/crypto/aes/armcrypto.zig+4-4| ... | @@ -216,10 +216,10 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { | ... | @@ -216,10 +216,10 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | /// XOR the block vector with a byte sequence. | 218 | /// XOR the block vector with a byte sequence. |
| 219 | pub fn xorBytes(block_vec: Self, bytes: *const [blocks_count * 16]u8) [32]u8 { | 219 | pub fn xorBytes(block_vec: Self, bytes: *const [blocks_count * 16]u8) [blocks_count * 16]u8 { |
| 220 | var out: Self = undefined; | 220 | var out: [blocks_count * 16]u8 = undefined; |
| 221 | inline for (0..native_words) |i| { | 221 | inline for (0..native_words) |i| { |
| 222 | out.repr[i] = block_vec.repr[i].xorBytes(bytes[i * native_word_size ..][0..native_word_size]); | 222 | out[i * native_word_size ..][0..native_word_size].* = block_vec.repr[i].xorBytes(bytes[i * native_word_size ..][0..native_word_size]); |
| 223 | } | 223 | } |
| 224 | return out; | 224 | return out; |
| 225 | } | 225 | } |
| ... | @@ -279,7 +279,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { | ... | @@ -279,7 +279,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | /// Apply the bitwise OR operation to the content of two block vectors. | 281 | /// Apply the bitwise OR operation to the content of two block vectors. |
| 282 | pub fn orBlocks(block_vec1: Self, block_vec2: Block) Self { | 282 | pub fn orBlocks(block_vec1: Self, block_vec2: Self) Self { |
| 283 | var out: Self = undefined; | 283 | var out: Self = undefined; |
| 284 | inline for (0..native_words) |i| { | 284 | inline for (0..native_words) |i| { |
| 285 | out.repr[i] = block_vec1.repr[i].orBlocks(block_vec2.repr[i]); | 285 | out.repr[i] = block_vec1.repr[i].orBlocks(block_vec2.repr[i]); |
lib/std/crypto/aes/soft.zig+4-4| ... | @@ -391,10 +391,10 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { | ... | @@ -391,10 +391,10 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { |
| 391 | } | 391 | } |
| 392 | 392 | ||
| 393 | /// XOR the block vector with a byte sequence. | 393 | /// XOR the block vector with a byte sequence. |
| 394 | pub fn xorBytes(block_vec: Self, bytes: *const [blocks_count * 16]u8) [32]u8 { | 394 | pub fn xorBytes(block_vec: Self, bytes: *const [blocks_count * 16]u8) [blocks_count * 16]u8 { |
| 395 | var out: Self = undefined; | 395 | var out: [blocks_count * 16]u8 = undefined; |
| 396 | for (0..native_words) |i| { | 396 | for (0..native_words) |i| { |
| 397 | out.repr[i] = block_vec.repr[i].xorBytes(bytes[i * native_word_size ..][0..native_word_size]); | 397 | out[i * native_word_size ..][0..native_word_size].* = block_vec.repr[i].xorBytes(bytes[i * native_word_size ..][0..native_word_size]); |
| 398 | } | 398 | } |
| 399 | return out; | 399 | return out; |
| 400 | } | 400 | } |
| ... | @@ -454,7 +454,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { | ... | @@ -454,7 +454,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { |
| 454 | } | 454 | } |
| 455 | 455 | ||
| 456 | /// Apply the bitwise OR operation to the content of two block vectors. | 456 | /// Apply the bitwise OR operation to the content of two block vectors. |
| 457 | pub fn orBlocks(block_vec1: Self, block_vec2: Block) Self { | 457 | pub fn orBlocks(block_vec1: Self, block_vec2: Self) Self { |
| 458 | var out: Self = undefined; | 458 | var out: Self = undefined; |
| 459 | for (0..native_words) |i| { | 459 | for (0..native_words) |i| { |
| 460 | out.repr[i] = block_vec1.repr[i].orBlocks(block_vec2.repr[i]); | 460 | out.repr[i] = block_vec1.repr[i].orBlocks(block_vec2.repr[i]); |