encrypt Method
Package: Aladdin
Description
Encrypts a buffer.
Syntax
boolean Aladdin.Hasp.encrypt ( byte[] buffer,
int length
)
Parameters
|
|
|
Size (in bytes) of the buffer to be encrypted. Minimum size: 16 bytes. Maximum size: 4 GB. |
Return Values
true/false - indicates success or failure.
Usage Notes
Encrypts data using the encryption engine in the Sentinel
protection key.
NOTE To defeat a protection key emulator attempting to bypass software protection, you can check periodically that the protection key is available and that a session for the key exists. This should not be done using GetSessionInfo (this method does not detect a remote broken session). Instead, use one of the following methods: Encrypt, Decrypt, Read, Write. These methods will return HASP_BROKEN_SESSION if a session for the protection key does not exist.
You can call the Encrypt or Decrypt method to check whether the license for the current Feature has expired. See Checking the License Expiration Date of a Feature.
Overloaded Methods
The following overloaded methods are provided. They differ from the method above only in the argument type that they accept.
boolean Aladdin.Hasp.encrypt ( byte [] buffer )