From 519bf9d027446d703d2d821bf2f39de37589ab6c Mon Sep 17 00:00:00 2001 From: qmuntal Date: Fri, 27 Sep 2024 09:57:12 +0200 Subject: [PATCH] always use a named constant for none flags --- cng/hkdf.go | 2 +- cng/pbkdf2.go | 2 +- cng/tls1prf.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cng/hkdf.go b/cng/hkdf.go index 914b669..655926e 100644 --- a/cng/hkdf.go +++ b/cng/hkdf.go @@ -23,7 +23,7 @@ func SupportsHKDF() bool { } func loadHKDF() (bcrypt.ALG_HANDLE, error) { - return loadOrStoreAlg(bcrypt.HKDF_ALGORITHM, 0, "", func(h bcrypt.ALG_HANDLE) (bcrypt.ALG_HANDLE, error) { + return loadOrStoreAlg(bcrypt.HKDF_ALGORITHM, bcrypt.ALG_NONE_FLAG, "", func(h bcrypt.ALG_HANDLE) (bcrypt.ALG_HANDLE, error) { return h, nil }) } diff --git a/cng/pbkdf2.go b/cng/pbkdf2.go index 49f1ce2..5466b18 100644 --- a/cng/pbkdf2.go +++ b/cng/pbkdf2.go @@ -15,7 +15,7 @@ import ( ) func loadPBKDF2() (bcrypt.ALG_HANDLE, error) { - return loadOrStoreAlg(bcrypt.PBKDF2_ALGORITHM, 0, "", func(h bcrypt.ALG_HANDLE) (bcrypt.ALG_HANDLE, error) { + return loadOrStoreAlg(bcrypt.PBKDF2_ALGORITHM, bcrypt.ALG_NONE_FLAG, "", func(h bcrypt.ALG_HANDLE) (bcrypt.ALG_HANDLE, error) { return h, nil }) } diff --git a/cng/tls1prf.go b/cng/tls1prf.go index c4e08b5..5a3fb01 100644 --- a/cng/tls1prf.go +++ b/cng/tls1prf.go @@ -15,7 +15,7 @@ import ( ) func loadTLS1PRF(id string) (bcrypt.ALG_HANDLE, error) { - return loadOrStoreAlg(id, 0, "", func(h bcrypt.ALG_HANDLE) (bcrypt.ALG_HANDLE, error) { + return loadOrStoreAlg(id, bcrypt.ALG_NONE_FLAG, "", func(h bcrypt.ALG_HANDLE) (bcrypt.ALG_HANDLE, error) { return h, nil }) }