use crate::models::{Identifier, PurposeKeyAttestation, PurposeKeyAttestationData};
use ockam_vault::{X25519PublicKey, X25519SecretKeyHandle};
#[derive(Clone, Debug)]
pub struct SecureChannelPurposeKey {
subject: Identifier,
key: X25519SecretKeyHandle,
public_key: X25519PublicKey,
data: PurposeKeyAttestationData,
attestation: PurposeKeyAttestation,
}
impl SecureChannelPurposeKey {
pub fn new(
subject: Identifier,
key: X25519SecretKeyHandle,
public_key: X25519PublicKey,
data: PurposeKeyAttestationData,
attestation: PurposeKeyAttestation,
) -> Self {
Self {
subject,
key,
public_key,
data,
attestation,
}
}
pub fn subject(&self) -> &Identifier {
&self.subject
}
pub fn key(&self) -> &X25519SecretKeyHandle {
&self.key
}
pub fn public_key(&self) -> &X25519PublicKey {
&self.public_key
}
pub fn attestation(&self) -> &PurposeKeyAttestation {
&self.attestation
}
pub fn data(&self) -> &PurposeKeyAttestationData {
&self.data
}
}