// Rshare - a file sharing program written in Rust.
// Copyright (C) 2017 Cooper Paul EdenDay
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
// Electronic mail: cedenday@protonmail.com
// Paper mail: 100 Front Street, #31, Bath, Maine, 04530, USA

use std;
use ring::agreement::EphemeralPrivateKey;

#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct Advert {
    pub ip: std::net::IpAddr,
    pub public_key: Vec<u8>,
    pub hash: Vec<u8>,
}

#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct Key {
    pub file_path: String,
    pub num_parts: u64,
    pub nonce: Vec<u8>,
}

pub struct KexState {
    pub my_private_key: EphemeralPrivateKey,
    pub link_public_key: Vec<u8>,
}

pub struct Metadata {
    pub file_path: String,
    pub nonce: Vec<u8>,
}
