package server.logic.ws_protocol.JSON.messages;

final class SignedMessageKeys {
    private SignedMessageKeys() {}

    static String baseKey(String toLogin, String fromLogin, long timeMs, long nonce) {
        return fromLogin + "|" + toLogin + "|" + timeMs + "|" + nonce;
    }

    static String messageKey(String toLogin, String fromLogin, long timeMs, long nonce, int messageType) {
        return baseKey(toLogin, fromLogin, timeMs, nonce) + "|" + messageType;
    }
}
