Skip to content

Commit

Permalink
add Signature::as_array
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid committed Feb 22, 2025
1 parent 9919546 commit 066d30f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions signature/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ impl Default for Signature {

impl solana_sanitize::Sanitize for Signature {}

impl Signature {
/// Return a reference to the `Signature`'s byte array.
#[inline(always)]
pub const fn as_array(&self) -> &[u8; SIGNATURE_BYTES] {
&self.0
}
}

#[cfg(feature = "rand")]
impl Signature {
pub fn new_unique() -> Self {
Expand Down

0 comments on commit 066d30f

Please sign in to comment.