| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 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 <vector> |
| 6 |
| 7 #include "device/u2f/u2f_responses.h" |
| 8 |
| 9 namespace device { |
| 10 |
| 11 scoped_refptr<U2fRegisterResponse> U2fRegisterResponse::Create( |
| 12 U2fApduResponse::Status status, |
| 13 std::vector<uint8_t> user_public_key, |
| 14 std::vector<uint8_t> key_handle, |
| 15 std::vector<uint8_t> attestation_cert, |
| 16 std::vector<uint8_t> signature) { |
| 17 return make_scoped_refptr(new U2fRegisterResponse( |
| 18 status, std::move(user_public_key), std::move(key_handle), |
| 19 std::move(attestation_cert), std::move(signature))); |
| 20 } |
| 21 |
| 22 U2fRegisterResponse::U2fRegisterResponse(U2fApduResponse::Status status, |
| 23 std::vector<uint8_t> user_public_key, |
| 24 std::vector<uint8_t> key_handle, |
| 25 std::vector<uint8_t> attestation_cert, |
| 26 std::vector<uint8_t> signature) |
| 27 : status_(status), |
| 28 user_public_key_(std::move(user_public_key)), |
| 29 key_handle_(std::move(key_handle)), |
| 30 attestation_cert_(std::move(attestation_cert)), |
| 31 signature_(std::move(signature)) {} |
| 32 |
| 33 U2fRegisterResponse::~U2fRegisterResponse() {} |
| 34 |
| 35 scoped_refptr<U2fSignResponse> U2fSignResponse::Create( |
| 36 U2fApduResponse::Status status, |
| 37 uint8_t presence, |
| 38 uint32_t counter, |
| 39 std::vector<uint8_t> signature) { |
| 40 return make_scoped_refptr( |
| 41 new U2fSignResponse(status, presence, counter, std::move(signature))); |
| 42 } |
| 43 |
| 44 U2fSignResponse::U2fSignResponse(U2fApduResponse::Status status, |
| 45 uint8_t presence, |
| 46 uint32_t counter, |
| 47 std::vector<uint8_t> signature) |
| 48 : status_(status), |
| 49 presence_(presence), |
| 50 counter_(counter), |
| 51 signature_(std::move(signature)) {} |
| 52 |
| 53 U2fSignResponse::~U2fSignResponse() {} |
| 54 |
| 55 } // namespace device |
| OLD | NEW |