Type Alias dryoc::dryocbox::protected::SecretKey

source ·
pub type SecretKey = HeapByteArray<CRYPTO_BOX_SECRETKEYBYTES>;
Available on crate feature nightly only.
Expand description

Heap-allocated, page-aligned secret key for authenticated public-key boxes, for use with protected memory.

Aliased Type§

struct SecretKey(/* private fields */);

Trait Implementations

source§

impl<const LENGTH: usize> AsMut<[u8]> for HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<LENGTH>

source§

fn clone(&self) -> HeapByteArray<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 HeapByteArray<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 HeapByteArray<LENGTH>

source§

fn default() -> Self

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

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

source§

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

Mutably dereferences the value.
source§

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

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<const LENGTH: usize> From<&[u8; LENGTH]> for HeapByteArray<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 HeapByteArray<LENGTH>

source§

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

Converts to this type from the input type.
source§

impl<const LENGTH: usize> From<StackByteArray<LENGTH>> for HeapByteArray<LENGTH>

source§

fn from(other: StackByteArray<LENGTH>) -> Self

Converts to this type from the input type.
source§

impl<const LENGTH: usize> Index<Range<usize>> for HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<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> Lockable<HeapByteArray<LENGTH>> for HeapByteArray<LENGTH>

source§

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

Locks a HeapByteArray, and returns a Protected wrapper.

source§

impl<const LENGTH: usize> MutByteArray<LENGTH> for HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<LENGTH>

source§

fn new_bytes() -> Self

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

impl<const LENGTH: usize> NewLockedFromSlice<HeapByteArray<LENGTH>> for HeapByteArray<LENGTH>

source§

fn from_slice_into_locked( other: &[u8] ) -> Result<Protected<Self, ReadWrite, Locked>, Error>

Returns a new locked byte array from other. Panics if sizes do not match.

source§

fn from_slice_into_readonly_locked( other: &[u8] ) -> Result<Protected<Self, ReadOnly, Locked>, Error>

Returns a new read-only locked region of memory from src.
source§

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

source§

fn eq(&self, other: &HeapByteArray<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 HeapByteArray<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<const LENGTH: usize> TryFrom<&[u8]> for HeapByteArray<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 HeapByteArray<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 HeapByteArray<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 HeapByteArray<LENGTH>

source§

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