Ejemplo n.º 1
0
        public byte[] Export(CngKeyBlobFormat format)
        {
            if (format == null)
            {
                throw new ArgumentNullException("format");
            }
            KeyContainerPermission permission = this.BuildKeyContainerPermission(KeyContainerPermissionFlags.Export);

            if (permission != null)
            {
                permission.Demand();
            }
            return(NCryptNative.ExportKey(this.m_keyHandle, format.Format));
        }