2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
20 namespace Tizen.Security.SecureRepository
23 /// A class for a policy for storing key, certificate, and binary data.
25 /// <since_tizen> 3 </since_tizen>
29 /// A default constructor of Policy with default policy.
31 /// <since_tizen> 3 </since_tizen>
32 /// <remarks>The default value for Password is null and the default value for Extractabl is false.</remarks>
40 /// A constructor of Key that takes the password and the flag for extractable.
42 /// <since_tizen> 3 </since_tizen>
43 /// <param name="password">Used to encrypt data secure repository.</param>
44 /// <param name="extractable">If true key may be extracted from secure repository.</param>
45 public Policy(String password, bool extractable)
48 Extractable = extractable;
52 /// Used to encrypt data secure repository. If it is not null, the data
53 /// (or key, or certificate) is stored encrypted with this password inside secure repository
55 /// <since_tizen> 3 </since_tizen>
56 public String Password
62 /// If true key may be extracted from secure repository.
64 /// <since_tizen> 3 </since_tizen>
65 public bool Extractable
70 internal CkmcPolicy ToCkmcPolicy()
72 return new Interop.CkmcPolicy(Password, Extractable);