Index: components/webcrypto/algorithms/aes_cbc.cc |
diff --git a/components/webcrypto/algorithms/aes_cbc.cc b/components/webcrypto/algorithms/aes_cbc.cc |
index c9e941aa7ee92f636d0dc84e5e4e8c0853fb35aa..a31882964e9862ef1ddddd1b112f297c064302b6 100644 |
--- a/components/webcrypto/algorithms/aes_cbc.cc |
+++ b/components/webcrypto/algorithms/aes_cbc.cc |
@@ -55,7 +55,8 @@ Status AesCbcEncryptDecrypt(EncryptOrDecrypt cipher_operation, |
if (!output_max_len.IsValid()) |
return Status::ErrorDataTooLarge(); |
- const unsigned remainder = output_max_len.ValueOrDie() % AES_BLOCK_SIZE; |
+ const unsigned remainder = |
+ (output_max_len % AES_BLOCK_SIZE).template ValueOrDie<unsigned>(); |
if (remainder != 0) |
Tom Sepez
2016/11/29 20:06:26
I'm not grokking this. Can you explain? May be t
jschuh
2016/11/29 21:04:47
It's the template disambiguator for dependent name
jschuh
2016/11/30 23:38:52
I added some helpers and am using those at the cal
|
output_max_len += AES_BLOCK_SIZE - remainder; |
if (!output_max_len.IsValid()) |
@@ -71,7 +72,7 @@ Status AesCbcEncryptDecrypt(EncryptOrDecrypt cipher_operation, |
return Status::OperationError(); |
} |
- buffer->resize(output_max_len.ValueOrDie()); |
+ buffer->resize(output_max_len.template ValueOrDie<size_t>()); |
int output_len = 0; |
if (!EVP_CipherUpdate(context.get(), buffer->data(), &output_len, |