Documentation ¶
Overview ¶
Package memstore implements a key store in memory (for testing purposes).
Index ¶
- type MemStore
- func (ms *MemStore) AddPrivateKeyEntry(ke *uid.KeyEntry)
- func (ms *MemStore) AddPublicKeyEntry(identity string, ke *uid.KeyEntry)
- func (ms *MemStore) AddSessionKey(hash, json, privKey string, cleanupTime uint64) error
- func (ms *MemStore) CleanupSessionKeys(t uint64) error
- func (ms *MemStore) DelMessageKey(sessionKey string, sender bool, msgIndex uint64) error
- func (ms *MemStore) DelPrivSessionKey(hash string) error
- func (ms *MemStore) GetChainKey(sessionKey string) (*[32]byte, error)
- func (ms *MemStore) GetMessageKey(sessionKey string, sender bool, msgIndex uint64) (*[64]byte, error)
- func (ms *MemStore) GetPrivateKeyEntry(pubKeyHash string) (*uid.KeyEntry, error)
- func (ms *MemStore) GetPublicKeyEntry(uidMsg *uid.Message) (*uid.KeyEntry, string, error)
- func (ms *MemStore) GetRootKeyHash(sessionKey string) (*[64]byte, error)
- func (ms *MemStore) GetSessionKey(hash string) (json, privKey string, err error)
- func (ms *MemStore) GetSessionState(sessionStateKey string) (*session.State, error)
- func (ms *MemStore) HasSession(sessionKey string) bool
- func (ms *MemStore) NumMessageKeys(sessionKey string) (uint64, error)
- func (ms *MemStore) SessionKey() string
- func (ms *MemStore) SetSessionState(sessionStateKey string, sessionState *session.State) error
- func (ms *MemStore) StoreSession(sessionKey, rootKeyHash, chainKey string, send, recv []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemStore ¶
type MemStore struct {
// contains filtered or unexported fields
}
MemStore implements the KeyStore interface in memory.
func (*MemStore) AddPrivateKeyEntry ¶
AddPrivateKeyEntry adds private KeyEntry to memory store.
func (*MemStore) AddPublicKeyEntry ¶
AddPublicKeyEntry adds public KeyEntry from identity to memory store.
func (*MemStore) AddSessionKey ¶
AddSessionKey implemented in memory.
func (*MemStore) CleanupSessionKeys ¶
CleanupSessionKeys implemented in memory.
func (*MemStore) DelMessageKey ¶
DelMessageKey implemented in memory.
func (*MemStore) DelPrivSessionKey ¶
DelPrivSessionKey implemented in memory.
func (*MemStore) GetChainKey ¶
GetChainKey implemented in memory.
func (*MemStore) GetMessageKey ¶
func (ms *MemStore) GetMessageKey( sessionKey string, sender bool, msgIndex uint64, ) (*[64]byte, error)
GetMessageKey implemented in memory.
func (*MemStore) GetPrivateKeyEntry ¶
GetPrivateKeyEntry implemented in memory.
func (*MemStore) GetPublicKeyEntry ¶
GetPublicKeyEntry implemented in memory.
func (*MemStore) GetRootKeyHash ¶
GetRootKeyHash implemented in memory.
func (*MemStore) GetSessionKey ¶
GetSessionKey implemented in memory.
func (*MemStore) GetSessionState ¶
GetSessionState implemented in memory.
func (*MemStore) HasSession ¶
HasSession implemented in memory.
func (*MemStore) NumMessageKeys ¶
NumMessageKeys implemented in memory.
func (*MemStore) SessionKey ¶
SessionKey returns the most recent sessionKey in MemStore.
func (*MemStore) SetSessionState ¶
SetSessionState implemented in memory.