diff --git a/src/qr_login.rs b/src/qr_login.rs index 4dd6e0b..4bd8f26 100644 --- a/src/qr_login.rs +++ b/src/qr_login.rs @@ -44,7 +44,7 @@ pub struct QrCodeData { #[wasm_bindgen] impl QrCodeData { /// Create new [`QrCodeData`] from a given public key, a rendezvous URL and, - /// optionally, a homeserver ULR. + /// optionally, a homeserver URL. /// /// If a homeserver URL is given, then the [`QrCodeData`] mode will be /// [`QrCodeMode::Reciprocate`], i.e. the QR code will contain data for the @@ -93,25 +93,28 @@ impl QrCodeData { Ok(Self { inner: qr_login::QrCodeData::from_base64(data)? }) } - /// Encode the [`QrCodeData`] into a list of bytes. + /// Encode the [`QrCodeData`] into a string using base64. /// - /// The list of bytes can be used by a QR code generator to create an image - /// containing a QR code. + /// This format can be used for debugging purposes and the + /// [`QrcodeData::from_base64()`] method can be used to parse the string + /// again. pub fn to_base64(&self) -> String { self.inner.to_base64() } /// Get the Curve25519 public key embedded in the [`QrCodeData`]. /// - /// This Curve25519 public key should be used to establish an ECIES channel - /// with the other device. + /// This Curve25519 public key should be used to establish an + /// [ECIES](https://en.wikipedia.org/wiki/Integrated_Encryption_Scheme) + /// (Elliptic Curve Integrated Encryption Scheme) channel with the other + /// device. #[wasm_bindgen(getter)] pub fn public_key(&self) -> Curve25519PublicKey { self.inner.public_key.into() } /// Get the URL of the rendezvous server which will be used to exchange - /// devices between the two devices. + /// messages between the two devices. #[wasm_bindgen(getter)] pub fn rendezvous_url(&self) -> String { self.inner.rendezvous_url.as_str().to_owned()