OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "crypto/ec_signature_creator.h" |
| 6 |
| 7 namespace crypto { |
| 8 |
| 9 namespace { |
| 10 |
| 11 ECSignatureCreatorFactory* g_factory_ = NULL; |
| 12 |
| 13 } // namespace |
| 14 |
| 15 // static |
| 16 ECSignatureCreator* ECSignatureCreator::Create(ECPrivateKey* key) { |
| 17 if (g_factory_) |
| 18 return g_factory_->Create(key); |
| 19 return CreatePlatformImpl(key); |
| 20 } |
| 21 |
| 22 // static |
| 23 void ECSignatureCreator::SetFactoryForTesting( |
| 24 ECSignatureCreatorFactory* factory) { |
| 25 g_factory_ = factory; |
| 26 } |
| 27 |
| 28 } // namespace crypto |
OLD | NEW |