tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

lib.rs (474B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 extern crate data_encoding;
      6 extern crate nsstring;
      7 
      8 use data_encoding::BASE32;
      9 use nsstring::{nsACString, nsCString};
     10 
     11 #[no_mangle]
     12 pub extern "C" fn base32encode(unencoded: &nsACString, encoded: &mut nsCString) {
     13    encoded.assign(&BASE32.encode(&unencoded[..]));
     14 }