28 lines
391 B
Go
28 lines
391 B
Go
package crypto
|
|
|
|
import "io"
|
|
|
|
// KeyManager defines the contract for loading and generating recipient keys.
|
|
type KeyManager interface {
|
|
LoadPub(
|
|
path string,
|
|
schemeID uint16,
|
|
) (
|
|
RecipientPub,
|
|
error,
|
|
)
|
|
LoadPriv(
|
|
path string,
|
|
schemeID uint16,
|
|
) (
|
|
RecipientPriv,
|
|
error,
|
|
)
|
|
Generate(
|
|
schemeID uint16,
|
|
pubOut io.Writer,
|
|
privOut io.Writer,
|
|
rand io.Reader,
|
|
) error
|
|
}
|