Esempio n. 1
0
        /// <summary>
        /// Load a Windows DPAPI Protected Key
        /// </summary>
        /// <param name="key"></param>
        public Key(IProtectedKey key)
        {
            if (key == null)
            {
                throw new ArgumentNullException(nameof(key));
            }

            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                Bytes = ProtectedData.Unprotect(key.ProtectedBytes, null, DataProtectionScope.CurrentUser);
            }
            else
            {
                throw new NotImplementedException();
            }
        }
Esempio n. 2
0
 public PublicKey(IProtectedKey protectedSharedPubKey) : base(protectedSharedPubKey)
 {
 }
Esempio n. 3
0
 public PrivateSecretKey(IProtectedKey protectedPrivateKey) : base(protectedPrivateKey)
 {
 }