Minor documentation fixes
This commit is contained in:
parent
2748dae7eb
commit
ec0e8407f2
|
@ -13,7 +13,8 @@
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
//! Constants
|
//! # Constants
|
||||||
|
//! Constants related to the API and the underlying curve
|
||||||
|
|
||||||
/// The size (in bytes) of a message
|
/// The size (in bytes) of a message
|
||||||
pub const MESSAGE_SIZE: usize = 32;
|
pub const MESSAGE_SIZE: usize = 32;
|
||||||
|
|
|
@ -13,7 +13,9 @@
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
//! FFI bindings
|
//! # FFI bindings
|
||||||
|
//! Direct bindings to the underlying C library functions. These should
|
||||||
|
//! not be needed for most users.
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use libc::{c_int, c_uchar, c_uint, c_void, size_t};
|
use libc::{c_int, c_uchar, c_uint, c_void, size_t};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
//! Public/Private keys
|
//! # Public and secret keys
|
||||||
|
|
||||||
use std::intrinsics::copy_nonoverlapping;
|
use std::intrinsics::copy_nonoverlapping;
|
||||||
use std::marker;
|
use std::marker;
|
||||||
|
|
|
@ -182,7 +182,7 @@ impl_array_newtype!(Message, u8, constants::MESSAGE_SIZE);
|
||||||
impl_pretty_debug!(Message);
|
impl_pretty_debug!(Message);
|
||||||
|
|
||||||
impl Message {
|
impl Message {
|
||||||
/// Converts a `MESSAGE_SIZE`-byte slice to a nonce
|
/// Converts a `MESSAGE_SIZE`-byte slice to a message object
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn from_slice(data: &[u8]) -> Result<Message, Error> {
|
pub fn from_slice(data: &[u8]) -> Result<Message, Error> {
|
||||||
match data.len() {
|
match data.len() {
|
||||||
|
|
Loading…
Reference in New Issue