use crate::sm2::point::ProjectivePoint;
#[derive(Clone, Copy, Debug)]
pub struct Sm2PublicKey {
point: ProjectivePoint,
}
impl Sm2PublicKey {
#[must_use]
pub const fn from_point(point: ProjectivePoint) -> Self {
Self { point }
}
#[must_use]
pub const fn point(&self) -> ProjectivePoint {
self.point
}
}
impl From<ProjectivePoint> for Sm2PublicKey {
fn from(p: ProjectivePoint) -> Self {
Self::from_point(p)
}
}