Пример #1
0
        /// <summary>
        /// Construct a SessionCipher for encrypt/decrypt operations on a session.
        /// In order to use SessionCipher, a session must have already been created
        /// and stored using <see cref="SessionBuilder"/>.
        /// </summary>
        /// <param name="sessionStore">The <see cref="ISessionStore"/> that contains a session for this recipient.</param>
        /// <param name="preKeyStore">Pre key store.</param>
        /// <param name="signedPreKeyStore">Signed pre key store.</param>
        /// <param name="identityKeyStore">Identity key store.</param>
        /// <param name="remoteAddress">The remote address that messages will be encrypted to or decrypted from.</param>
        public SessionCipher(ISessionStore sessionStore, IPreKeyStore preKeyStore,
		                     ISignedPreKeyStore signedPreKeyStore, IIdentityKeyStore identityKeyStore,
		                     AxolotlAddress remoteAddress)
        {
            _sessionStore = sessionStore;
            _preKeyStore = preKeyStore;
            _remoteAddress = remoteAddress;
            _sessionBuilder = new SessionBuilder(sessionStore, preKeyStore, signedPreKeyStore, identityKeyStore, remoteAddress);
        }
Пример #2
0
        public SessionBuilder(ISessionStore sessionStore,
		                      IPreKeyStore preKeyStore,
		                      ISignedPreKeyStore signedPreKeyStore,
		                      IIdentityKeyStore identityKeyStore,
		                      AxolotlAddress remoteAddress)
        {
            _sessionStore      = sessionStore;
            _preKeyStore       = preKeyStore;
            _signedPreKeyStore = signedPreKeyStore;
            _identityKeyStore  = identityKeyStore;
            _remoteAddress     = remoteAddress;
        }
Пример #3
0
 public SenderKeyName(string groupId, AxolotlAddress sender)
 {
     GroupID = groupId;
     Sender = sender;
 }
Пример #4
0
 public SessionBuilder(IAxolotlStore store, AxolotlAddress remoteAddress)
     : this(store, store, store, store, remoteAddress)
 {
 }