pub enum AcdpSigningKey {
Ed25519(SigningKey),
P256(P256SigningKey),
}Expand description
Either-or signing key — selects the algorithm at construction time.
Producers normally use acdp::producer::Producer::new_ed25519 or
acdp::producer::Producer::new_p256 rather than constructing this
enum directly. The acdp::producer::RequestBuilder inspects the
variant to emit the matching signature.algorithm field.
Variants§
Ed25519(SigningKey)
Ed25519 — mandatory baseline.
P256(P256SigningKey)
ECDSA-P256 — interop variant.
Implementations§
Source§impl AcdpSigningKey
impl AcdpSigningKey
Sourcepub fn sign_content_hash(&self, hash: &ContentHash) -> (&'static str, String)
pub fn sign_content_hash(&self, hash: &ContentHash) -> (&'static str, String)
Returns (algorithm_str, base64_signature) for the wire envelope.
The first element is the literal string ACDP requires in
signature.algorithm ("ed25519" or "ecdsa-p256").
Trait Implementations§
Source§impl Debug for AcdpSigningKey
impl Debug for AcdpSigningKey
Source§impl From<P256SigningKey> for AcdpSigningKey
impl From<P256SigningKey> for AcdpSigningKey
Source§fn from(k: P256SigningKey) -> Self
fn from(k: P256SigningKey) -> Self
Converts to this type from the input type.
Source§impl From<SigningKey> for AcdpSigningKey
impl From<SigningKey> for AcdpSigningKey
Source§fn from(k: SigningKey) -> Self
fn from(k: SigningKey) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AcdpSigningKey
impl RefUnwindSafe for AcdpSigningKey
impl Send for AcdpSigningKey
impl Sync for AcdpSigningKey
impl Unpin for AcdpSigningKey
impl UnsafeUnpin for AcdpSigningKey
impl UnwindSafe for AcdpSigningKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more