mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
{Signing,Verifying}KeyVisitor: visit_borrowed_bytes -> visit_bytes (#602)
This commit is contained in:
parent
f08bbb7f57
commit
a2ff6ba9e4
2 changed files with 2 additions and 8 deletions
|
|
@ -746,10 +746,7 @@ impl<'d> Deserialize<'d> for SigningKey {
|
||||||
write!(formatter, concat!("An ed25519 signing (private) key"))
|
write!(formatter, concat!("An ed25519 signing (private) key"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_borrowed_bytes<E: serde::de::Error>(
|
fn visit_bytes<E: serde::de::Error>(self, bytes: &[u8]) -> Result<Self::Value, E> {
|
||||||
self,
|
|
||||||
bytes: &'de [u8],
|
|
||||||
) -> Result<Self::Value, E> {
|
|
||||||
SigningKey::try_from(bytes).map_err(E::custom)
|
SigningKey::try_from(bytes).map_err(E::custom)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -636,10 +636,7 @@ impl<'d> Deserialize<'d> for VerifyingKey {
|
||||||
write!(formatter, concat!("An ed25519 verifying (public) key"))
|
write!(formatter, concat!("An ed25519 verifying (public) key"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_borrowed_bytes<E: serde::de::Error>(
|
fn visit_bytes<E: serde::de::Error>(self, bytes: &[u8]) -> Result<Self::Value, E> {
|
||||||
self,
|
|
||||||
bytes: &'de [u8],
|
|
||||||
) -> Result<Self::Value, E> {
|
|
||||||
VerifyingKey::try_from(bytes).map_err(E::custom)
|
VerifyingKey::try_from(bytes).map_err(E::custom)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue