@@ -85,7 +85,7 @@ impl KbkdfDkmLengthFormat {
8585 } ,
8686 bLittleEndian : ( endianness == Endianness :: Little ) . into ( ) ,
8787 ulWidthInBits : width_in_bits. try_into ( ) . expect (
88- "bit width of KBKDF derived key material length value does not fit in CK_ULONG" ,
88+ "bit width of KBKDF DKM length value does not fit in CK_ULONG" ,
8989 ) ,
9090 } )
9191 }
@@ -111,7 +111,8 @@ pub enum PrfDataParamType<'a> {
111111/// * [`PrfDataParamType::IterationVariable`] is required for the KDF in all modes.
112112/// * In counter-mode, [`PrfDataParamType::IterationVariable`] must contain [`KbkdfCounterFormat`].
113113/// In feedback- and double pipeline-mode, it must contain [`None`].
114- /// * [`PrfDataParamType::Counter`] must not be present in counter-mode.
114+ /// * [`PrfDataParamType::Counter`] must not be present in counter-mode, and can be present at most
115+ /// once in feedback- and double-pipeline modes.
115116/// * [`PrfDataParamType::DkmLength`] can be present at most once, in any mode.
116117/// * [`PrfDataParamType::ByteArray`] can be present any amount of times, in any mode.
117118#[ derive( Debug , Clone , Copy ) ]
@@ -162,7 +163,7 @@ impl<'a> PrfDataParam<'a> {
162163 ulValueLen : data
163164 . len ( )
164165 . try_into ( )
165- . expect ( "length of data parameter does not fit in CK_ULONG" ) ,
166+ . expect ( "length of PRF data parameter does not fit in CK_ULONG" ) ,
166167 } ,
167168 } ,
168169 _marker : PhantomData ,
@@ -259,7 +260,7 @@ impl<'a> KbkdfParams<'a> {
259260 ulNumberOfDataParams : prf_data_params
260261 . len ( )
261262 . try_into ( )
262- . expect ( "number of data parameters does not fit in CK_ULONG" ) ,
263+ . expect ( "number of PRF data parameters does not fit in CK_ULONG" ) ,
263264 pDataParams : prf_data_params. as_ptr ( ) as cryptoki_sys:: CK_PRF_DATA_PARAM_PTR ,
264265 ulAdditionalDerivedKeys : additional_derived_keys. as_ref ( ) . map_or ( 0 , |keys| {
265266 keys. len ( )
@@ -331,7 +332,7 @@ impl<'a> KbkdfFeedbackParams<'a> {
331332 ulNumberOfDataParams : prf_data_params
332333 . len ( )
333334 . try_into ( )
334- . expect ( "number of data parameters does not fit in CK_ULONG" ) ,
335+ . expect ( "number of PRF data parameters does not fit in CK_ULONG" ) ,
335336 pDataParams : prf_data_params. as_ptr ( ) as cryptoki_sys:: CK_PRF_DATA_PARAM_PTR ,
336337 ulIVLen : iv. map_or ( 0 , |iv| {
337338 iv. len ( )
0 commit comments