24 lines
408 B
Go
24 lines
408 B
Go
|
package sqlite_directory
|
||
|
|
||
|
import (
|
||
|
"crypto"
|
||
|
|
||
|
"crispbyte.dev/sig-auth/keydirectory"
|
||
|
)
|
||
|
|
||
|
func CreateDirectory(alg string, publicKey crypto.PublicKey) InMemoryDirectory {
|
||
|
keyDir := InMemoryDirectory{
|
||
|
records: map[string]keydirectory.KeyEntry{},
|
||
|
}
|
||
|
|
||
|
keyId := "test-id"
|
||
|
|
||
|
keyDir.records[keyId] = keydirectory.KeyEntry{
|
||
|
Alg: alg,
|
||
|
PublicKey: publicKey,
|
||
|
UserId: "test_user",
|
||
|
}
|
||
|
|
||
|
return keyDir
|
||
|
}
|