| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bd311b6 commit 45c3782
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,17 +63,13 @@ Maybe<bool> SecretKeyGenTraits::AdditionalConfig( | |||
| 63 | 63 | SecretKeyGenConfig* params) { | |
| 64 | 64 | CHECK(args[*offset]->IsUint32()); | |
| 65 | 65 | uint32_t bits = args[*offset].As<Uint32>()->Value(); | |
| 66 | - static_assert(std::numeric_limits<decltype(bits)>::max() / CHAR_BIT <= | ||
| 67 | - INT_MAX); | ||
| 68 | 66 | params->length = bits / CHAR_BIT; | |
| 69 | 67 | *offset += 1; | |
| 70 | 68 | return Just(true); | |
| 71 | 69 | } | |
| 72 | 70 | ||
| 73 | - KeyGenJobStatus SecretKeyGenTraits::DoKeyGen( | ||
| 74 | - Environment* env, | ||
| 75 | - SecretKeyGenConfig* params) { | ||
| 76 | - CHECK_LE(params->length, INT_MAX); | ||
| 71 | + KeyGenJobStatus SecretKeyGenTraits::DoKeyGen(Environment* env, | ||
| 72 | + SecretKeyGenConfig* params) { | ||
| 77 | 73 | ByteSource::Builder bytes(params->length); | |
| 78 | 74 | if (CSPRNG(bytes.data<unsigned char>(), params->length).is_err()) | |
| 79 | 75 | return KeyGenJobStatus::FAILED; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments