Type Alias dryoc::sign::SecretKey

source ·
pub type SecretKey = StackByteArray<CRYPTO_SIGN_SECRETKEYBYTES>;
Expand description

Stack-allocated secret key for message signing.

Aliased Type§

struct SecretKey(/* private fields */);

Implementations

source§

impl<const LENGTH: usize> StackByteArray<LENGTH>

source

pub fn mlock( self ) -> Result<Protected<HeapByteArray<LENGTH>, ReadWrite, Locked>, Error>

Available on crate feature nightly only.

Locks a StackByteArray, consuming it, and returning a Protected wrapper.

source§

impl<const LENGTH: usize> StackByteArray<LENGTH>

source

pub fn mprotect_readonly( self ) -> Result<Protected<HeapByteArray<LENGTH>, ReadOnly, Unlocked>, Error>

Available on crate feature nightly only.

Returns a readonly protected StackByteArray.

source§

impl<const LENGTH: usize> StackByteArray<LENGTH>

source

pub fn new() -> Self

Returns a new fixed-length stack-allocated array

Trait Implementations

source§

impl<const LENGTH: usize> AsMut<[u8]> for StackByteArray<LENGTH>

source§

fn as_mut(&mut self) -> &mut [u8]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<const LENGTH: usize> AsMut<[u8; LENGTH]> for StackByteArray<LENGTH>

source§

fn as_mut(&mut self) -> &mut [u8; LENGTH]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<const LENGTH: usize> AsRef<[u8]> for StackByteArray<LENGTH>

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<const LENGTH: usize> AsRef<[u8; LENGTH]> for StackByteArray<LENGTH>

source§

fn as_ref(&self) -> &[u8; LENGTH]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<const LENGTH: usize> ByteArray<LENGTH> for StackByteArray<LENGTH>

source§

fn as_array(&self) -> &[u8; LENGTH]

Returns a reference to the underlying fixed-length byte array.
source§

impl<const LENGTH: usize> Bytes for StackByteArray<LENGTH>

source§

fn as_slice(&self) -> &[u8]

Returns a slice of the underlying bytes.
source§

fn len(&self) -> usize

Shorthand to retrieve the underlying length of the byte array.
source§

fn is_empty(&self) -> bool

Returns true if the array is empty.
source§

impl<const LENGTH: usize> Clone for StackByteArray<LENGTH>

source§

fn clone(&self) -> StackByteArray<LENGTH>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<const LENGTH: usize> Debug for StackByteArray<LENGTH>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<const LENGTH: usize> Default for StackByteArray<LENGTH>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<const LENGTH: usize> DerefMut for StackByteArray<LENGTH>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de, const LENGTH: usize> Deserialize<'de> for StackByteArray<LENGTH>

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<const LENGTH: usize> Drop for StackByteArray<LENGTH>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<const LENGTH: usize> From<&[u8; LENGTH]> for StackByteArray<LENGTH>

source§

fn from(src: &[u8; LENGTH]) -> Self

Converts to this type from the input type.
source§

impl<const LENGTH: usize> From<[u8; LENGTH]> for StackByteArray<LENGTH>

source§

fn from(src: [u8; LENGTH]) -> Self

Converts to this type from the input type.
source§

impl<const LENGTH: usize> Index<Range<usize>> for StackByteArray<LENGTH>

§

type Output = [u8]

The returned type after indexing.
source§

fn index(&self, index: Range<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> Index<RangeFrom<usize>> for StackByteArray<LENGTH>

§

type Output = [u8]

The returned type after indexing.
source§

fn index(&self, index: RangeFrom<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> Index<RangeFull> for StackByteArray<LENGTH>

§

type Output = [u8]

The returned type after indexing.
source§

fn index(&self, index: RangeFull) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> Index<RangeInclusive<usize>> for StackByteArray<LENGTH>

§

type Output = [u8]

The returned type after indexing.
source§

fn index(&self, index: RangeInclusive<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> Index<RangeTo<usize>> for StackByteArray<LENGTH>

§

type Output = [u8]

The returned type after indexing.
source§

fn index(&self, index: RangeTo<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> Index<RangeToInclusive<usize>> for StackByteArray<LENGTH>

§

type Output = [u8]

The returned type after indexing.
source§

fn index(&self, index: RangeToInclusive<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> Index<usize> for StackByteArray<LENGTH>

§

type Output = u8

The returned type after indexing.
source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> IndexMut<Range<usize>> for StackByteArray<LENGTH>

source§

fn index_mut(&mut self, index: Range<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> IndexMut<RangeFrom<usize>> for StackByteArray<LENGTH>

source§

fn index_mut(&mut self, index: RangeFrom<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> IndexMut<RangeFull> for StackByteArray<LENGTH>

source§

fn index_mut(&mut self, index: RangeFull) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> IndexMut<RangeInclusive<usize>> for StackByteArray<LENGTH>

source§

fn index_mut(&mut self, index: RangeInclusive<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> IndexMut<RangeTo<usize>> for StackByteArray<LENGTH>

source§

fn index_mut(&mut self, index: RangeTo<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> IndexMut<RangeToInclusive<usize>> for StackByteArray<LENGTH>

source§

fn index_mut(&mut self, index: RangeToInclusive<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> IndexMut<usize> for StackByteArray<LENGTH>

source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<const LENGTH: usize> MutByteArray<LENGTH> for StackByteArray<LENGTH>

source§

fn as_mut_array(&mut self) -> &mut [u8; LENGTH]

Returns a mutable reference to the underlying fixed-length byte array.
source§

impl<const LENGTH: usize> MutBytes for StackByteArray<LENGTH>

source§

fn as_mut_slice(&mut self) -> &mut [u8]

Returns a mutable slice to the underlying bytes.
source§

fn copy_from_slice(&mut self, other: &[u8])

Copies into the underlying slice from other. Panics if lengths do not match.
source§

impl<const LENGTH: usize> NewByteArray<LENGTH> for StackByteArray<LENGTH>

source§

fn gen() -> Self

Returns a new byte array filled with random data.

source§

fn new_byte_array() -> Self

Returns a new fixed-length byte array, initialized with zeroes.
source§

impl<const LENGTH: usize> NewBytes for StackByteArray<LENGTH>

source§

fn new_bytes() -> Self

Returns an empty, unallocated, arbitrary-length byte array.
source§

impl<const LENGTH: usize> PartialEq for StackByteArray<LENGTH>

source§

fn eq(&self, other: &StackByteArray<LENGTH>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<const LENGTH: usize> Serialize for StackByteArray<LENGTH>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'a, const LENGTH: usize> TryFrom<&'a [u8]> for StackByteArray<LENGTH>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(src: &[u8]) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const LENGTH: usize> Zeroize for StackByteArray<LENGTH>

source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
source§

impl<const LENGTH: usize> Deref for StackByteArray<LENGTH>

§

type Target = [u8]

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<const LENGTH: usize> Eq for StackByteArray<LENGTH>

source§

impl<const LENGTH: usize> StructuralPartialEq for StackByteArray<LENGTH>