Skip to content

Commit 68b92c1

Browse files
committed
draft
1 parent 50e0a9d commit 68b92c1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/padding/pkcs_1_v2_2.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ end
5757
function MGF1(mgfSeed::Vector{UInt8}, maskLen:: Integer; hash = SHA.sha1)
5858
hLen = hash(UInt8[]) |> length
5959
maskLen >= (2 << 32) && error("mask too long") |> throw
60-
T = Vector{UInt8}()
60+
T = zeros(UInt8, 0)
6161
for counter in big"0":BigInt((ceil(maskLen / hLen) - 1))
6262
C = I2OSP(counter, 4)
6363
T = vcat(T, hash(vcat(mgfSeed, C)))

src/utils/string.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function I2OSP(x::BigInt, xLen::Integer)
3333
_order = 0
3434
_endian = 0
3535
_nails = 0
36-
ret = Vector{UInt8}()
36+
ret = zeros(UInt8, 0)
3737
Base.GMP.MPZ.export!(ret, x; order=_order, nails=_nails, endian=_endian)
3838
ret_len = ret |> length
3939
if ret_len < xLen

0 commit comments

Comments
 (0)