RMS SDK for C++  0.2.1
A client library for using Microsoft RMS from Linux.
utils.h
1 /*
2  * ======================================================================
3  * Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
4  * Licensed under the MIT License.
5  * See LICENSE.md in the project root for license information.
6  * ======================================================================
7 */
8 
9 #ifndef UTILS_H
10 #define UTILS_H
11 
12 #include "types.h"
13 
14 namespace rmsauth {
15 
17 {
18 public:
19  static bool startsWith(const String& src, const String& substr);
20  static bool endsWith(const String& src, const String& substr);
21  static int compareIC(const String& src, const String& str);
22  static bool equalsIC(const String& src, const String& str);
23  static String trim(const String& src);
24  static String removeQuoteInHeaderValue(const String& src);
25  static String toLower(const String& src);
26  static StringArray split(const String& src, const char delim);
27  static String replace(const String& src, const String& form, const String& to);
28  static String replaceAll(const String& src, const String& form, const String& to);
29  static String replaceAll(const String& src, const char form, const char to);
30 };
31 
32 class HashUtils
33 {
34 public:
35  static String createSha256Hash(const String& token);
36 };
37 
38 } //namespace rmsauth {
39 
40 #endif // UTILS_H
Definition: utils.h:32
Definition: utils.h:16
Definition: AcquireTokenForClientHandler.h:14