File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ pub enum Error {
5555 /// Password hash string invalid.
5656 PhcStringField ,
5757
58- /// Password hash string contains leftover characters .
59- PhcStringLeftover ,
58+ /// Password hash string contains trailing data .
59+ PhcStringTrailingData ,
6060
6161 /// Salt invalid.
6262 SaltInvalid ( InvalidValue ) ,
@@ -90,8 +90,8 @@ impl fmt::Display for Error {
9090 Self :: ParamsMaxExceeded => f. write_str ( "maximum number of parameters reached" ) ,
9191 Self :: Password => write ! ( f, "invalid password" ) ,
9292 Self :: PhcStringField => write ! ( f, "password hash string missing field" ) ,
93- Self :: PhcStringLeftover => {
94- write ! ( f, "password hash string contains leftover characters" )
93+ Self :: PhcStringTrailingData => {
94+ write ! ( f, "password hash string contains trailing characters" )
9595 }
9696 Self :: SaltInvalid ( val_err) => write ! ( f, "salt invalid: {}" , val_err) ,
9797 Self :: Version => write ! ( f, "invalid algorithm version" ) ,
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ impl<'a> PasswordHash<'a> {
187187 }
188188
189189 if fields. next ( ) . is_some ( ) {
190- return Err ( Error :: PhcStringLeftover ) ;
190+ return Err ( Error :: PhcStringTrailingData ) ;
191191 }
192192
193193 Ok ( Self {
You can’t perform that action at this time.
0 commit comments