mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
crypto: remove extraneous casts & rename rand_lin to rand_linux
This commit is contained in:
committed by
Alexander Medvednikov
parent
dd61a22367
commit
2897bac549
@@ -107,7 +107,7 @@ pub fn (d mut Digest) checksum() []byte {
|
||||
// tmp := [1 + 63 + 8]byte{0x80}
|
||||
mut tmp := [byte(0)].repeat(1 + 63 + 8)
|
||||
tmp[0] = 0x80
|
||||
pad := int((55 - int(d.len)) % u64(64)) // calculate number of padding bytes
|
||||
pad := ((55 - int(d.len)) % u64(64)) // calculate number of padding bytes
|
||||
binary.little_endian_put_u64(mut tmp[1+pad..], d.len<<u64(3)) // append length in bits
|
||||
d.write(tmp[..1+pad+8])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user