INNER CODE UNIT · Rust
from
IronCoreLabs/recrypt-rs · src/internal/mod.rs:137
fn from(api_pk: api_480::PrivateKey) -> Self {
PrivateKey {
value: Fp480::from(api_pk.to_bytes_60()).to_monty(),
}
}
}
impl<'a> From<&'a api_480::PrivateKey> for PrivateKey<fp_480::Monty> {
fn from(api_pk: &'a api_480::PrivateKey) -> Self {
PrivateKey {
value: Fp480::from(api_pk.to_bytes_60()).to_monty(),
}
}
}
impl PrivateKey<fp_480::Monty> {
pub fn from_fp480(fp480: fp_480::Monty) -> PrivateKey<fp_480::Monty> {
PrivateKey { value: fp480 }