(bytes: Uint8Array)
| 110 | /// @returns {Plaintext} The plaintext object. |
| 111 | #[wasm_bindgen(js_name = "fromBytesLe")] |
| 112 | pub fn from_bytes_le(bytes: Uint8Array) -> Result<Plaintext, String> { |
| 113 | let rust_bytes = bytes.to_vec(); |
| 114 | let native = PlaintextNative::from_bytes_le(rust_bytes.as_slice()).map_err(|e| e.to_string())?; |
| 115 | Ok(Self(native)) |
| 116 | } |
| 117 | |
| 118 | /// Get the little endian byte array representation of the plaintext. |
| 119 | /// |