From: CryptoManiac Date: Sun, 16 Aug 2015 20:04:14 +0000 (+0300) Subject: CKey constructors X-Git-Url: https://git.novaco.in/?a=commitdiff_plain;h=a68204412c035b72161d0725a2bd9de3e4dc397b;p=NovacoinLibrary.git CKey constructors --- 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); } } }