Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: crypto/curve25519_openssl.cc

Issue 1539353003: Switch to standard integer types in crypto/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « crypto/curve25519_nss.cc ('k') | crypto/curve25519_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "crypto/curve25519.h" 5 #include "crypto/curve25519.h"
6 6
7 #include <openssl/curve25519.h> 7 #include <openssl/curve25519.h>
8 #include <stdint.h>
8 9
9 namespace crypto { 10 namespace crypto {
10 11
11 namespace curve25519 { 12 namespace curve25519 {
12 13
13 bool ScalarMult(const uint8_t* private_key, 14 bool ScalarMult(const uint8_t* private_key,
14 const uint8_t* peer_public_key, 15 const uint8_t* peer_public_key,
15 uint8_t* shared_key) { 16 uint8_t* shared_key) {
16 return !!X25519(shared_key, private_key, peer_public_key); 17 return !!X25519(shared_key, private_key, peer_public_key);
17 } 18 }
18 19
19 void ScalarBaseMult(const uint8_t* private_key, uint8_t* public_key) { 20 void ScalarBaseMult(const uint8_t* private_key, uint8_t* public_key) {
20 X25519_public_from_private(public_key, private_key); 21 X25519_public_from_private(public_key, private_key);
21 } 22 }
22 23
23 } // namespace curve25519 24 } // namespace curve25519
24 25
25 } // namespace crypto 26 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/curve25519_nss.cc ('k') | crypto/curve25519_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698