Commit 23efff0 1 parent 68f1509 commit 23efff0 Copy full SHA for 23efff0
File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -162,11 +162,35 @@ where
162
162
}
163
163
}
164
164
165
+ impl < B : core:: fmt:: Debug > core:: fmt:: Debug for UnparsedPublicKey < B >
166
+ where
167
+ B : AsRef < [ u8 ] > ,
168
+ {
169
+ fn fmt ( & self , f : & mut core:: fmt:: Formatter ) -> Result < ( ) , core:: fmt:: Error > {
170
+ f. debug_struct ( "UnparsedPublicKey" )
171
+ . field ( "algorithm" , & self . algorithm )
172
+ . field ( "bytes" , & self . bytes )
173
+ . finish ( )
174
+ }
175
+ }
176
+
165
177
impl < B : AsRef < [ u8 ] > > UnparsedPublicKey < B > {
166
178
/// Constructs a new `UnparsedPublicKey`.
167
179
pub fn new ( algorithm : & ' static Algorithm , bytes : B ) -> Self {
168
180
Self { algorithm, bytes }
169
181
}
182
+
183
+ /// TODO: doc
184
+ #[ inline]
185
+ pub fn algorithm ( & self ) -> & ' static Algorithm {
186
+ self . algorithm
187
+ }
188
+
189
+ /// TODO: doc
190
+ #[ inline]
191
+ pub fn bytes ( & self ) -> & B {
192
+ & self . bytes
193
+ }
170
194
}
171
195
172
196
/// Performs a key agreement with an ephemeral private key and the given public
You can’t perform that action at this time.
0 commit comments