File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 28
28
#include < iomanip> // / For functions like std::setw, std::setfill
29
29
#include < iostream> // / For managing io
30
30
#include < sstream> // / For bytes to hex string
31
- #include < stdexcept> // / For standard exceptions like std::runtime_error
31
+ #include < stdexcept> // / For standard exceptions like std::invalid_argument
32
32
#include < string> // / For string data
33
33
#include < thread> // / To parallelize for efficiency
34
34
#include < vector> // / For dynamic arrays
@@ -64,9 +64,9 @@ class RIPEMD160 {
64
64
return (B & D) | (C & ~D);
65
65
case 4 :
66
66
return B ^ (C | ~D);
67
+ default :
68
+ throw std::invalid_argument (" j value out of bound" );
67
69
}
68
-
69
- throw std::runtime_error (" j value out of bound" );
70
70
}
71
71
72
72
/* *
@@ -87,9 +87,9 @@ class RIPEMD160 {
87
87
return static_cast <uint32_t >(0x8F1BBCDC );
88
88
case 4 :
89
89
return static_cast <uint32_t >(0xA953FD4E );
90
+ default :
91
+ throw std::invalid_argument (" j value out of bound" );
90
92
}
91
-
92
- throw std::runtime_error (" j value out of bound" );
93
93
}
94
94
95
95
/* *
@@ -110,9 +110,9 @@ class RIPEMD160 {
110
110
return 0x7A6D76E9 ;
111
111
case 4 :
112
112
return 0x00000000 ;
113
+ default :
114
+ throw std::invalid_argument (" j value out of bound" );
113
115
}
114
-
115
- throw std::runtime_error (" j value out of bound" );
116
116
}
117
117
118
118
/* *
You can’t perform that action at this time.
0 commit comments