pub struct AgreementPublicKey(/* private fields */);Expand description
A key-agreement.public-key: the exchangeable half of an agreement
keypair, minted by x25519’s imports and
generate_key. Secret-free.
Implementations§
Source§impl AgreementPublicKey
impl AgreementPublicKey
Sourcepub fn algorithm_name(&self) -> String
pub fn algorithm_name(&self) -> String
The name of the key’s algorithm family, e.g. "X25519" —
WebCrypto’s KeyAlgorithm.name.
Sourcepub async fn export_key_raw(&self) -> Result<Vec<u8>, Error>
pub async fn export_key_raw(&self) -> Result<Vec<u8>, Error>
The public key material, in the minting interface’s documented public format (32 bytes for X25519).
There is no extractability gate on public material, so this never
fails Error::NotExtractable — but it can fail Error::Other:
a provider may hold the key as a handle it can use but not read
(see VerifyingKey::export_key_raw).
Sourcepub async fn export_key_jwk(&self) -> Result<String, Error>
pub async fn export_key_jwk(&self) -> Result<String, Error>
The public key as a JWK (an RFC 8037 OKP public key for X25519),
with the same handle-not-bytes fallibility as
export_key_raw.
Sourcepub async fn export_key_spki(&self) -> Result<Vec<u8>, Error>
pub async fn export_key_spki(&self) -> Result<Vec<u8>, Error>
The public key as an X.509 SubjectPublicKeyInfo (DER), with the
same handle-not-bytes fallibility as
export_key_raw.