Location: Symbol Reference > Classes > TJwEncryptMemory Class > TJwEncryptMemory Methods > TJwEncryptMemory.EncryptMemory Method
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwEncryptMemory.EncryptMemory Method
Pascal
class procedure EncryptMemory(var P: Pointer; var Size: Cardinal; const Flags: TJwProtectMemoryFlagSet; const MemoryType: TJwMemoryType); virtual;
Parameters 
Description 
var P: Pointer 
Defines a pointer which must be encrypted.  
var Size: Cardinal 
Defines how much data of P must be encrypted. Do specify exactly the amount of allocated memory of P. Otherwise the memory which is beyond the given Size can become overwritten by the encrypted data.  
const Flags: TJwProtectMemoryFlagSet 
Defines who can decrypt the new data.
  • pmSameProcess - defines that only the process which created the encrypted data can decrypt it
  • pmCrossProcess - defines that other processes on the same computer can decrypt the data
  • pmSameLogon - defines only the same use can decrypt the data

 
const MemoryType: TJwMemoryType 
defines which type of memory manager created P. Currently only mtGetMem is supported. 

EncryptMemory encrypts and protects a block of memory. If the necessary memory is not big enough it automatically increases the memory.

Exceptions 
Description 
EjwsclCryptUnsupportedException 
if MemoryType is not mtGetMem. 
EjwsclCryptApiException 
if an underlying API function failed.
TJwEncryptMemory 
Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc.
What do you think about this topic? Send feedback!