48 lines
1.1 KiB
Go
48 lines
1.1 KiB
Go
|
|
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
|