diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sign.rs | 2 | ||||
-rw-r--r-- | src/tag.rs | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/sign.rs b/src/sign.rs index 8490f6c..e53e566 100644 --- a/src/sign.rs +++ b/src/sign.rs @@ -15,7 +15,7 @@ //! Ed25519 signing and verification //! //! `Ring` does not provide a multi-step (init-update-finish) interface -//! for Ed25519 signatures. `Verifier` and `Signer` attempt to provide this +//! for Ed25519 signatures. `Verifier` and `Signer` provide this //! missing multi-step api. extern crate ring; @@ -36,9 +36,6 @@ pub enum Tag { PAD, } -static PAD_VALUE: [u8; 4] = [b'P', b'A', b'D', 0xff]; -static SIG_VALUE: [u8; 4] = [b'S', b'I', b'G', 0x00]; - impl Tag { /// Translates a tag into its on-the-wire representation pub fn wire_value(&self) -> &'static [u8] { @@ -50,12 +47,12 @@ impl Tag { Tag::MIDP => "MIDP".as_bytes(), Tag::MINT => "MINT".as_bytes(), Tag::NONC => "NONC".as_bytes(), - Tag::PAD => PAD_VALUE.as_ref(), + Tag::PAD => [b'P', b'A', b'D', 0xff].as_ref(), Tag::PATH => "PATH".as_bytes(), Tag::PUBK => "PUBK".as_bytes(), Tag::RADI => "RADI".as_bytes(), Tag::ROOT => "ROOT".as_bytes(), - Tag::SIG => SIG_VALUE.as_ref(), + Tag::SIG => [b'S', b'I', b'G', 0x00].as_ref(), Tag::SREP => "SREP".as_bytes(), } } |