File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ where
120120 let seed_der = SeedString {
121121 tag_mode : TagMode :: Implicit ,
122122 tag_number : SEED_TAG_NUMBER ,
123- value : OctetStringRef :: new ( & self . to_seed ( ) ) ?,
123+ value : OctetStringRef :: new ( self . as_seed ( ) ) ?,
124124 }
125125 . to_der ( ) ?;
126126
Original file line number Diff line number Diff line change @@ -90,10 +90,22 @@ impl<P: MlDsaParams> SigningKey<P> {
9090 }
9191 }
9292
93- /// Serialize the [`Seed`] value: 32-bytes which can be used to reconstruct the
94- /// [`SigningKey`].
93+ /// Borrow the [`Seed`] value: 32-bytes which can be used to reconstruct the [`SigningKey`].
9594 ///
96- /// <div class = "warning">
95+ /// <div class="warning">
96+ /// <b>Warning</b>
97+ ///
98+ /// This value is key material. Please treat it with care.
99+ /// </div>
100+ #[ inline]
101+ #[ must_use]
102+ pub fn as_seed ( & self ) -> & Seed {
103+ & self . seed
104+ }
105+
106+ /// Serialize the [`Seed`] value: 32-bytes which can be used to reconstruct the [`SigningKey`].
107+ ///
108+ /// <div class="warning">
97109 /// <b>Warning</b>
98110 ///
99111 /// This value is key material. Please treat it with care.
You can’t perform that action at this time.
0 commit comments