Chromium Code Reviews| Index: third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp |
| diff --git a/third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp b/third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..96fd29fc412eb21c533019305b9cd5e8f7c795cd |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/inspector/AddStringToDigestor.cpp |
| @@ -0,0 +1,17 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "core/inspector/AddStringToDigestor.h" |
| + |
| +#include "platform/wtf/text/WTFString.h" |
| +#include "public/platform/WebCrypto.h" |
| + |
| +namespace blink { |
| + |
| +void AddStringToDigestor(WebCryptoDigestor* digestor, const String& string) { |
| + digestor->Consume( |
| + reinterpret_cast<const unsigned char*>(string.Ascii().data()), |
|
alph
2017/07/08 01:16:24
I bet string.Ascii().length() is not equal to stri
Daniel Bratell
2017/07/10 14:47:18
So thanks to your review I realized that the two f
alph
2017/07/10 21:26:06
I believe it's not really important which encoding
|
| + string.length()); |
| +} |
| +} // namespace blink |