@@ -44,7 +44,7 @@ pub struct QrCodeData {
44
44
#[ wasm_bindgen]
45
45
impl QrCodeData {
46
46
/// Create new [`QrCodeData`] from a given public key, a rendezvous URL and,
47
- /// optionally, a homeserver ULR .
47
+ /// optionally, a homeserver URL .
48
48
///
49
49
/// If a homeserver URL is given, then the [`QrCodeData`] mode will be
50
50
/// [`QrCodeMode::Reciprocate`], i.e. the QR code will contain data for the
@@ -93,25 +93,28 @@ impl QrCodeData {
93
93
Ok ( Self { inner : qr_login:: QrCodeData :: from_base64 ( data) ? } )
94
94
}
95
95
96
- /// Encode the [`QrCodeData`] into a list of bytes .
96
+ /// Encode the [`QrCodeData`] into a string using base64 .
97
97
///
98
- /// The list of bytes can be used by a QR code generator to create an image
99
- /// containing a QR code.
98
+ /// This format can be used for debugging purposes and the
99
+ /// [`QrcodeData::from_base64()`] method can be used to parse the string
100
+ /// again.
100
101
pub fn to_base64 ( & self ) -> String {
101
102
self . inner . to_base64 ( )
102
103
}
103
104
104
105
/// Get the Curve25519 public key embedded in the [`QrCodeData`].
105
106
///
106
- /// This Curve25519 public key should be used to establish an ECIES channel
107
- /// with the other device.
107
+ /// This Curve25519 public key should be used to establish an
108
+ /// [ECIES](https://en.wikipedia.org/wiki/Integrated_Encryption_Scheme)
109
+ /// (Elliptic Curve Integrated Encryption Scheme) channel with the other
110
+ /// device.
108
111
#[ wasm_bindgen( getter) ]
109
112
pub fn public_key ( & self ) -> Curve25519PublicKey {
110
113
self . inner . public_key . into ( )
111
114
}
112
115
113
116
/// Get the URL of the rendezvous server which will be used to exchange
114
- /// devices between the two devices.
117
+ /// messages between the two devices.
115
118
#[ wasm_bindgen( getter) ]
116
119
pub fn rendezvous_url ( & self ) -> String {
117
120
self . inner . rendezvous_url . as_str ( ) . to_owned ( )
0 commit comments