KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > KernelCAD Models > Securing Models
Secure Models

Securing Models

Model Encryption

Valuable models can be protected with a password. When the password string kept by KerneCAD component at runtime is not empty during any save operation the model is srongly encrypted using the password. The same password is expected to be set for the model to be able to load. If the password is not set or wrong the model file being loaded will be invalid and the load operation will fail. This way it is possible to ensure that the model can be viewed only by specific user(s)

The password is not stored in the model. It can only be set at run time. The password is the string with id 1 from the component context. For example, to set "orange" as the password for reading and/or writing obtain IKCContext interface via Component > GetView > IView > IKCContext and use IKCContext.SetStringParam(1, "orange"). Call IKCContext.GetStringParam(1) the check if the passworf has already been set. Call IKCContext.SetStringParam(1, "") to make thepassword empty and to stop using encryption.

If the application has to load a secured model on the start, the ModelPath should be empty in the KernelCAD control properties. On start the application must set password first and then load the required model either by setting ModelPath or using other methods described in Model Persistance.

When a password is set KernelCAD still detects at runtime and loads unencrypted models in usual non-secure mode. Contact us to request ability to customise this behaiviour.

Persistance to memory

For security and performance reasons the model can also be saved to or loaded from a memory buffer thus avoiding saving to to the disk altogether. See IModelEx.LoadFromMemory() and IModelEx.SaveToMemory().

Embedded models

The model can also be embedded in the executable file of the application. In addition to extra security this makes sure that the application always uses the correct model and sometimes more convenient way to deploy the application. See EmbeddedModel property for details.

Default model file extension

It is possible to change the default .glm model file extension. Files with the default extension are assumed to have the default KernelCAD format, normally saved as .glm. The default extension is the string with id 2 from the component context. For example, to change the default extension from .glm to .mmod use IKCContext.SetStringParam(2, "mmod"). Call IKCContext.GetStringParam(2) to obtain the current default extension.