目录

keystore.go

优质
小牛编辑
136浏览
2023-12-01

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)}