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

Side by Side Diff: Source/modules/crypto/Key.h

Issue 21016005: WebCrypto: Add more operations to the platform API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 public: 46 public:
47 static PassRefPtr<Key> create(const WebKit::WebCryptoKey& key) { return adop tRef(new Key(key)); } 47 static PassRefPtr<Key> create(const WebKit::WebCryptoKey& key) { return adop tRef(new Key(key)); }
48 48
49 ~Key(); 49 ~Key();
50 50
51 String type() const; 51 String type() const;
52 bool extractable() const; 52 bool extractable() const;
53 Algorithm* algorithm(); 53 Algorithm* algorithm();
54 Vector<String> usages() const; 54 Vector<String> usages() const;
55 55
56 const WebKit::WebCryptoKey& key() const { return m_key; }
57
56 static bool parseFormat(const String&, WebKit::WebCryptoKeyFormat&); 58 static bool parseFormat(const String&, WebKit::WebCryptoKeyFormat&);
57 59
58 // Parses KeyUsage strings to a WebCryptoKeyUsageMask. If any element is 60 // Parses KeyUsage strings to a WebCryptoKeyUsageMask. If any element is
59 // unrecognized, returns false. 61 // unrecognized, returns false.
60 static bool parseUsageMask(const Vector<String>&, WebKit::WebCryptoKeyUsageM ask&); 62 static bool parseUsageMask(const Vector<String>&, WebKit::WebCryptoKeyUsageM ask&);
61 63
62 protected: 64 protected:
63 explicit Key(const WebKit::WebCryptoKey&); 65 explicit Key(const WebKit::WebCryptoKey&);
64 66
65 const WebKit::WebCryptoKey m_key; 67 const WebKit::WebCryptoKey m_key;
66 RefPtr<Algorithm> m_algorithm; 68 RefPtr<Algorithm> m_algorithm;
67 }; 69 };
68 70
69 } // namespace WebCore 71 } // namespace WebCore
70 72
71 #endif 73 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/modules/crypto/SubtleCrypto.cpp » ('j') | Source/modules/crypto/SubtleCrypto.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698