Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 481 Bytes

keystore_go.md

File metadata and controls

19 lines (14 loc) · 481 Bytes

keystore.go

定义 KeyStore 接口,存储秘钥。

type KeyStore interface {

	// ReadOnly returns true if this KeyStore is read only, false otherwise.
	// If ReadOnly is true then StoreKey will fail.
	ReadOnly() bool

	// GetKey returns a key object whose SKI is the one passed.
	GetKey(ski []byte) (k Key, err error)

	// StoreKey stores the key k in this KeyStore.
	// If this KeyStore is read only then the method will fail.
	StoreKey(k Key) (err error)
}