| Index: ipc/brokerable_attachment_win.cc
|
| diff --git a/ipc/brokerable_attachment_win.cc b/ipc/brokerable_attachment_win.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6b567e60a8a2a34b964afb19f46b371e8429227e
|
| --- /dev/null
|
| +++ b/ipc/brokerable_attachment_win.cc
|
| @@ -0,0 +1,18 @@
|
| +// Copyright 2015 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 "ipc/brokerable_attachment.h"
|
| +
|
| +#include "crypto/random.h"
|
| +
|
| +namespace IPC {
|
| +
|
| +BrokerableAttachment::AttachmentId::AttachmentId() {
|
| + // In order to prevent mutually untrusted processes from stealing resources
|
| + // from one another, the nonce must be secret. This generates a 128-bit,
|
| + // cryptographicaly-strong random number.
|
| + crypto::RandBytes(nonce, BrokerableAttachment::kNonceSize);
|
| +}
|
| +
|
| +} // namespace IPC
|
|
|