about summary refs log tree commit diff
path: root/tvix/nix-compat
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/nix-compat')
-rw-r--r--tvix/nix-compat/src/narinfo/signature.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/tvix/nix-compat/src/narinfo/signature.rs b/tvix/nix-compat/src/narinfo/signature.rs
index fd197e771d98..e5567f44109a 100644
--- a/tvix/nix-compat/src/narinfo/signature.rs
+++ b/tvix/nix-compat/src/narinfo/signature.rs
@@ -1,17 +1,18 @@
 use std::fmt::{self, Display};
 
 use data_encoding::BASE64;
-use ed25519_dalek::SIGNATURE_LENGTH;
 use serde::{Deserialize, Serialize};
 
+const SIGNATURE_LENGTH: usize = std::mem::size_of::<ed25519::SignatureBytes>();
+
 #[derive(Clone, Debug, Eq, PartialEq)]
 pub struct Signature<'a> {
     name: &'a str,
-    bytes: [u8; SIGNATURE_LENGTH],
+    bytes: ed25519::SignatureBytes,
 }
 
 impl<'a> Signature<'a> {
-    pub fn new(name: &'a str, bytes: [u8; SIGNATURE_LENGTH]) -> Self {
+    pub fn new(name: &'a str, bytes: ed25519::SignatureBytes) -> Self {
         Self { name, bytes }
     }
 
@@ -46,7 +47,7 @@ impl<'a> Signature<'a> {
         self.name
     }
 
-    pub fn bytes(&self) -> &[u8; SIGNATURE_LENGTH] {
+    pub fn bytes(&self) -> &ed25519::SignatureBytes {
         &self.bytes
     }