hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit e7c1ae9ae2f331b035900fe428e67d1e09f8eaa2
parent 038c77b30849c44e24aeb5d28c77d9a3dd71bbd7
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sat, 20 Apr 2024 22:16:56 -0400

crypto::ec: replace pointer cast with integer cast

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mcrypto/ec/p256.ha | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/ec/p256.ha b/crypto/ec/p256.ha @@ -96,8 +96,8 @@ fn le30tobe8(dest: []u8, src: []u32) void = { assert(bytes::equal(be8, be8result)); }; -fn arsh(x: u32, n: u32) u32 = (*(&x: *i32) >> n: i32): u32; -fn arshw(x: u64, n: u32) u64 = (*(&x: *i64) >> n: i32): u64; +fn arsh(x: u32, n: u32) u32 = (x: i32 >> n: i32): u32; +fn arshw(x: u64, n: u32) u64 = (x: i64 >> n: i32): u64; @test fn arsh() void = assert(arsh(0x80000000u32, 2) == 0xe0000000);