CKey constructors
[NovacoinLibrary.git] / Novacoin / CKey.cs
1 \feffusing System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
6
7 namespace Novacoin
8 {
9     /// <summary>
10     /// Representation of ECDSA private key
11     /// </summary>
12     public class CKey
13     {
14         /// <summary>
15         /// Private key bytes
16         /// </summary>
17         private List<byte> privKeyBytes;
18
19         /// <summary>
20         /// Initialize new instance of CKey as copy of another instance.
21         /// </summary>
22         /// <param name="key">New CKey instance.</param>
23         public CKey(CKey key)
24         {
25             privKeyBytes = key.privKeyBytes;
26         }
27
28         /// <summary>
29         /// Initialize new instance of CKey using supplied byte sequence.
30         /// </summary>
31         /// <param name="bytes">New CKey instance.</param>
32         public CKey(IEnumerable<byte> bytes)
33         {
34             privKeyBytes = new List<byte>(bytes);
35         }
36
37         /// <summary>
38         /// Calculate public key for this private key.
39         /// </summary>
40         /// <returns>New CPubKey instance.</returns>
41         public CPubKey GetPubKey()
42         {
43             // stub
44
45             return new CPubKey((CPubKey)null);
46         }
47     }
48 }