summaryrefslogtreecommitdiff
path: root/chromium/components/ownership/owner_key_util.cc
blob: 177e233a8d59cf421534052bb58ac5eca09663c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/ownership/owner_key_util.h"

#include <utility>

namespace ownership {

///////////////////////////////////////////////////////////////////////////
// PublicKey

PublicKey::PublicKey(bool is_persisted, std::vector<uint8_t> data)
    : is_persisted_(is_persisted), data_(std::move(data)) {}

PublicKey::~PublicKey() = default;

scoped_refptr<PublicKey> PublicKey::clone() {
  return base::MakeRefCounted<ownership::PublicKey>(is_persisted_, data_);
}

///////////////////////////////////////////////////////////////////////////
// PrivateKey

PrivateKey::PrivateKey(crypto::ScopedSECKEYPrivateKey key)
    : key_(std::move(key)) {}

PrivateKey::~PrivateKey() = default;

}  // namespace ownership