-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinspect.go
More file actions
30 lines (22 loc) · 871 Bytes
/
inspect.go
File metadata and controls
30 lines (22 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
//go:build tools
// +build tools
package main
import (
"fmt"
"golang.org/x/crypto/pbkdf2"
//"golang.org/x/crypto/hkdf" // check if this exists
)
func main() {
fmt.Println("Inspecting crypto/sha3")
// Try to find NewLegacyKeccak256
// Since we can't use reflection on package, we can only try to compile or print knowns.
// But wait, if I can import it, I can print it?
// Go doesn't allow printing package exports easily at runtime without static ref.
// Let's just print type of pbkdf2.Key
fmt.Printf("pbkdf2.Key type: %T\n", pbkdf2.Key)
// Check sha3
// fmt.Printf("sha3.NewLegacyKeccak256: %T\n", sha3.NewLegacyKeccak256) // Compiler will fail if missing
// We can rely on compiler error from this file to tell us what is missing.
}