mirror of
https://github.com/luxfi/crypto.git
synced 2026-07-27 01:54:50 +00:00
fix: correct C bool comparison in blake3 CGO
- Use bool() cast instead of != 0 for C bool type
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"crypto/chacha20poly1305"
|
||||
"golang.org/x/crypto/chacha20poly1305"
|
||||
)
|
||||
|
||||
// AeadID identifies an AEAD algorithm
|
||||
|
||||
@@ -42,7 +42,7 @@ const (
|
||||
|
||||
var (
|
||||
// useGPU indicates if GPU acceleration is available
|
||||
useGPU = C.crypto_gpu_available() != 0
|
||||
useGPU = bool(C.crypto_gpu_available())
|
||||
)
|
||||
|
||||
// GPUAvailable returns true if GPU acceleration is available.
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import (
|
||||
"crypto/subtle"
|
||||
"errors"
|
||||
|
||||
"crypto/curve25519"
|
||||
"golang.org/x/crypto/curve25519"
|
||||
)
|
||||
|
||||
// X25519Impl implements X25519 as a KEM
|
||||
|
||||
Reference in New Issue
Block a user