Persits Software, Inc. Web Site
Main Menu:  Home |  Tasks |  Object Reference |  Crypto 101 |  FAQ |  Download & Buy |  Clients |  Live Demo |  Contact
 Navigator:  Home |  Object Reference |  CryptoBlob Object
XEncrypt CryptoName
  CryptoBlob Object
The CryptoBlob object is an auxiliary object for storing, exporting, importing and formatting binary data.

Properties Methods
Hex
Base64
Binary
DumpToFile
LoadFromFile
DumpToRegistry
LoadFromRegistry

  CryptoBlob Properties

Hex As String (Read/Write)

Sets and returns binary data in the form of a string of Hex characters.

Base64 As String (Read/Write)

Sets and returns binary data in the Base64-encoded form.

Binary As Variant (Read/Write)

Sets and returns binary data as a Variant-wrapped safe array of bytes. This format is useful for saving and loading binary data to and from the database as it is compatible with the ADO representation of blobs. It can also be used for such methods as ASP's Response.BinaryWrite.

  CryptoBlob Methods


Sub DumpToFile ( Path As String )
Saves the underlying blob to a file specified by Path.

Usage:

Blob.DumpToFile "c:\myfile.xxx"


Sub LoadFromFile ( Path As String )
Populates the blob object with binary data from a file specified by Path.

Usage:

Blob.LoadFromFile "c:\myfile.xxx"


Sub DumpToRegistry ( Hive As Long, Key As String, Value As String )
Saves the underlying blob to a registry key.

Hive must be set to one of the following values: &H80000000 (HKEY_CLASSES_ROOT), &H80000005 (HKEY_CURRENT_CONFIG), &H80000001 (HKEY_CURRENT_USER), &H80000002 (HKEY_LOCAL_MACHINE) or &H80000003 (HKEY_USERS).

Key and Value specify the registry key and value to be used. If the specified key and/or value does not exist it will be created. If Value is set to an empty string, the default value of the key will be used.

Usage:

Blob.DumpToRegistry &H80000001, "Software\ACME\My Product", "test"


Sub LoadFromRegistry ( Hive As Long, Key As String, Value As String )
Populates the blob object from a binary value of a registry key.

See the method DumpToRegistry for the description of the arguments.

Usage:

Blob.LoadFromRegistry &H80000001, "Software\ACME\My Product", "test"


CryptoName XEncrypt

Search this Site
  This site is owned and maintained by Persits Software, Inc. Copyright © 2000. All Rights Reserved.