Documentation
¶
Index ¶
- type KeyStore
- func (ks *KeyStore) DecryptMessage(encrypted *shared.EncryptedMessage, conversationID string) (*shared.Message, error)
- func (ks *KeyStore) EncryptMessage(sender, content, conversationID string) (*shared.EncryptedMessage, error)
- func (ks *KeyStore) GetGlobalKey() *shared.SessionKey
- func (ks *KeyStore) GetSessionKey(conversationID string) *shared.SessionKey
- func (ks *KeyStore) Initialize(passphrase string) error
- func (ks *KeyStore) Load(passphrase string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyStore ¶
type KeyStore struct {
// contains filtered or unexported fields
}
KeyStore manages cryptographic keys for the client (global encryption only)
func NewKeyStore ¶
NewKeyStore creates a new key store
func (*KeyStore) DecryptMessage ¶
func (ks *KeyStore) DecryptMessage(encrypted *shared.EncryptedMessage, conversationID string) (*shared.Message, error)
DecryptMessage decrypts a message using the appropriate session key
func (*KeyStore) EncryptMessage ¶
func (ks *KeyStore) EncryptMessage(sender, content, conversationID string) (*shared.EncryptedMessage, error)
EncryptMessage encrypts a message for a specific conversation
func (*KeyStore) GetGlobalKey ¶
func (ks *KeyStore) GetGlobalKey() *shared.SessionKey
GetGlobalKey returns the global session key
func (*KeyStore) GetSessionKey ¶
func (ks *KeyStore) GetSessionKey(conversationID string) *shared.SessionKey
GetSessionKey retrieves the global session key (only global encryption supported)
func (*KeyStore) Initialize ¶
Initialize initializes the keystore for global encryption only
Click to show internal directories.
Click to hide internal directories.