blob: 38d6eceae0aa4f9977e6c4ef4568762c122dca6c [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package agent
import (
"crypto/sha512"
"io"
"v.io/v23/security"
)
type Principal interface {
security.Principal
io.Closer
}
const PrincipalHandleByteSize = sha512.Size
type KeyManager interface {
NewPrincipal(inMemory bool) (handle [PrincipalHandleByteSize]byte, err error)
ServePrincipal(handle [PrincipalHandleByteSize]byte, socketPath string) error
StopServing(handle [PrincipalHandleByteSize]byte) error
DeletePrincipal(handle [PrincipalHandleByteSize]byte) error
io.Closer
}