mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Renamed a load of things from 'connection' to 'stream'.
This commit is contained in:
@@ -71,21 +71,20 @@ public interface CryptoComponent {
|
||||
SecretKey deriveTagKey(byte[] secret, boolean alice);
|
||||
|
||||
/**
|
||||
* Derives a frame key from the given temporary secret and connection
|
||||
* number.
|
||||
* Derives a frame key from the given temporary secret and stream number.
|
||||
* @param alice indicates whether the key is for a connection initiated by
|
||||
* Alice or Bob.
|
||||
* @param initiator indicates whether the key is for the initiator's or the
|
||||
* responder's side of the connection.
|
||||
*/
|
||||
SecretKey deriveFrameKey(byte[] secret, long connection, boolean alice,
|
||||
SecretKey deriveFrameKey(byte[] secret, long streamNumber, boolean alice,
|
||||
boolean initiator);
|
||||
|
||||
/** Returns a cipher for encrypting and authenticating connections. */
|
||||
/** Returns a cipher for encrypting and authenticating frames. */
|
||||
AuthenticatedCipher getFrameCipher();
|
||||
|
||||
/** Encodes the pseudo-random tag that is used to recognise a connection. */
|
||||
void encodeTag(byte[] tag, SecretKey tagKey, long connection);
|
||||
/** Encodes the pseudo-random tag that is used to recognise a stream. */
|
||||
void encodeTag(byte[] tag, SecretKey tagKey, long streamNumber);
|
||||
|
||||
/**
|
||||
* Encrypts and authenticates the given plaintext so it can be written to
|
||||
|
||||
@@ -3,21 +3,22 @@ package org.briarproject.api.crypto;
|
||||
import org.briarproject.api.ContactId;
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.lifecycle.Service;
|
||||
import org.briarproject.api.transport.ConnectionContext;
|
||||
import org.briarproject.api.transport.Endpoint;
|
||||
import org.briarproject.api.transport.StreamContext;
|
||||
|
||||
public interface KeyManager extends Service {
|
||||
|
||||
/**
|
||||
* Returns a connection context for connecting to the given contact over
|
||||
* the given transport, or null if an error occurs or the contact does not
|
||||
* support the transport.
|
||||
* Returns a {@link org.briarproject.api.transport.StreamContext
|
||||
* StreamContext} for sending data to the given contact over the given
|
||||
* transport, or null if an error occurs or the contact does not support
|
||||
* the transport.
|
||||
*/
|
||||
ConnectionContext getConnectionContext(ContactId c, TransportId t);
|
||||
StreamContext getStreamContext(ContactId c, TransportId t);
|
||||
|
||||
/**
|
||||
* Called whenever an endpoint has been added. The initial secret
|
||||
* is erased before returning.
|
||||
* Called whenever an endpoint has been added. The initial secret is erased
|
||||
* before returning.
|
||||
*/
|
||||
void endpointAdded(Endpoint ep, long maxLatency, byte[] initialSecret);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user