Files
syscrypt/syscrypt.go
2026-04-02 14:24:29 +01:00

48 lines
1.1 KiB
Go
Executable File

package syscrypt
import "sources.truenas.cloud/code/syscrypt/internal/vars"
type PrivateKeyWrapper struct {
PrivateKey struct {
Key string `json:"key"`
MLKEMKey string `json:"mlkem_key,omitempty"`
Serial string `json:"serial"`
Salt string `json:"salt"`
Date string `json:"date"`
Comment string `json:"comment"`
} `json:"PrivateKey"`
}
type PublicKeyWrapper struct {
PublicKey struct {
Key string `json:"key"`
MLKEMKey string `json:"mlkem_key,omitempty"`
Serial string `json:"serial"`
Salt string `json:"salt"`
Date string `json:"date"`
Comment string `json:"comment"`
} `json:"PublicKey"`
}
type ApiKeyWrapper struct {
ApiKey struct {
Key string `json:"key"`
Serial string `json:"serial"`
Salt string `json:"salt"`
Date string `json:"date"`
Comment string `json:"comment"`
} `json:"APIKey"`
}
type SaltEntry struct {
Ref string `json:"ref"`
Salt string `json:"salt"`
}
type Vault struct {
Entries []SaltEntry `json:"entries"`
}
var ArmorHeader = vars.PrivateKeyHeader
var ArmorFooter = vars.PrivateKeyFooter