Documentation ¶
Overview ¶
Package cryptengine implements the command engine for mutecrypt.
Index ¶
- type CryptEngine
- func (ce *CryptEngine) AddSessionKey(hash, json, privKey string, cleanupTime uint64) error
- func (ce *CryptEngine) CleanupSessionKeys(t uint64) error
- func (ce *CryptEngine) Close() error
- func (ce *CryptEngine) DelMessageKey(sessionKey string, sender bool, msgIndex uint64) error
- func (ce *CryptEngine) DelPrivSessionKey(hash string) error
- func (ce *CryptEngine) GetChainKey(sessionKey string) (*[32]byte, error)
- func (ce *CryptEngine) GetMessageKey(sessionKey string, sender bool, msgIndex uint64) (*[64]byte, error)
- func (ce *CryptEngine) GetPrivateKeyEntry(pubKeyHash string) (*uid.KeyEntry, error)
- func (ce *CryptEngine) GetPublicKeyEntry(uidMsg *uid.Message) (*uid.KeyEntry, string, error)
- func (ce *CryptEngine) GetRootKeyHash(sessionKey string) (*[64]byte, error)
- func (ce *CryptEngine) GetSessionKey(hash string) (json, privKey string, err error)
- func (ce *CryptEngine) GetSessionState(sessionStateKey string) (*session.State, error)
- func (ce *CryptEngine) HasSession(sessionKey string) bool
- func (ce *CryptEngine) NumMessageKeys(sessionKey string) (uint64, error)
- func (ce *CryptEngine) SetSessionState(sessionStateKey string, sessionState *session.State) error
- func (ce *CryptEngine) Start(args []string) error
- func (ce *CryptEngine) 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 CryptEngine ¶
type CryptEngine struct {
// contains filtered or unexported fields
}
CryptEngine abstracts a mutecrypt command engine.
func (*CryptEngine) AddSessionKey ¶
func (ce *CryptEngine) AddSessionKey( hash, json, privKey string, cleanupTime uint64, ) error
AddSessionKey implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) CleanupSessionKeys ¶
func (ce *CryptEngine) CleanupSessionKeys(t uint64) error
CleanupSessionKeys implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) Close ¶
func (ce *CryptEngine) Close() error
Close the underlying database of the crypt engine.
func (*CryptEngine) DelMessageKey ¶
func (ce *CryptEngine) DelMessageKey( sessionKey string, sender bool, msgIndex uint64, ) error
DelMessageKey implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) DelPrivSessionKey ¶
func (ce *CryptEngine) DelPrivSessionKey(hash string) error
DelPrivSessionKey implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) GetChainKey ¶
func (ce *CryptEngine) GetChainKey(sessionKey string) (*[32]byte, error)
GetChainKey implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) GetMessageKey ¶
func (ce *CryptEngine) GetMessageKey( sessionKey string, sender bool, msgIndex uint64, ) (*[64]byte, error)
GetMessageKey implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) GetPrivateKeyEntry ¶
func (ce *CryptEngine) GetPrivateKeyEntry(pubKeyHash string) (*uid.KeyEntry, error)
GetPrivateKeyEntry implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) GetPublicKeyEntry ¶
GetPublicKeyEntry implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) GetRootKeyHash ¶
func (ce *CryptEngine) GetRootKeyHash(sessionKey string) (*[64]byte, error)
GetRootKeyHash implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) GetSessionKey ¶
func (ce *CryptEngine) GetSessionKey(hash string) ( json, privKey string, err error, )
GetSessionKey implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) GetSessionState ¶
func (ce *CryptEngine) GetSessionState(sessionStateKey string) ( *session.State, error, )
GetSessionState implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) HasSession ¶
func (ce *CryptEngine) HasSession(sessionKey string) bool
HasSession implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) NumMessageKeys ¶
func (ce *CryptEngine) NumMessageKeys(sessionKey string) (uint64, error)
NumMessageKeys implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) SetSessionState ¶
func (ce *CryptEngine) SetSessionState( sessionStateKey string, sessionState *session.State, ) error
SetSessionState implements corresponding method for msg.KeyStore interface.
func (*CryptEngine) Start ¶
func (ce *CryptEngine) Start(args []string) error
Start starts the crypt engine with the given args.
func (*CryptEngine) StoreSession ¶
func (ce *CryptEngine) StoreSession( sessionKey, rootKeyHash, chainKey string, send, recv []string, ) error
StoreSession implements corresponding method for msg.KeyStore interface.