From a68204412c035b72161d0725a2bd9de3e4dc397b Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Sun, 16 Aug 2015 23:04:14 +0300 Subject: [PATCH] CKey constructors --- Novacoin/CKey.cs | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/Novacoin/CKey.cs b/Novacoin/CKey.cs index 7dc7330..875ac7f 100644 --- a/Novacoin/CKey.cs +++ b/Novacoin/CKey.cs @@ -6,13 +6,43 @@ using System.Threading.Tasks; namespace Novacoin { + /// + /// Representation of ECDSA private key + /// public class CKey { + /// + /// Private key bytes + /// + private List privKeyBytes; + + /// + /// Initialize new instance of CKey as copy of another instance. + /// + /// New CKey instance. + public CKey(CKey key) + { + privKeyBytes = key.privKeyBytes; + } + + /// + /// Initialize new instance of CKey using supplied byte sequence. + /// + /// New CKey instance. + public CKey(IEnumerable bytes) + { + privKeyBytes = new List(bytes); + } + + /// + /// Calculate public key for this private key. + /// + /// New CPubKey instance. public CPubKey GetPubKey() { // stub - return new CPubKey(); + return new CPubKey((CPubKey)null); } } } -- 1.7.1