Class SecureKey() Professional

Class function of the SecureKey() class


The class SecureKey acts as a key generator and a key provider.

Key generation is a very important aspect in secure environments. The key is generated by a random generator and hashed by a secure hashing algorithm.

Class methods
Creates an instance of the SecureKey class.
Creates an instance of the SecureKey class holding a generated key.
Hash data with the SHA-256 algorithm.
Destroys the internal buffers holding the key.
Assign a key in hexadecimal notation to the object executing the method.
Converts the hexadecimal form of the key into a binary representation.
Converts the binary key to a hexadecimal notation.
Generating a new key
// In this example, SecureKey() is used 
// to generate a new key 

#include "" 

   LOCAL oKey 
   // generate a key with 128 bit length 
   oKey := SecureKey():generate(128) 

   // print key in hexadecimal notation, using 
   // a colon to separate groups of 2 characters 
   // for better readability 

   ? oKey:toString(,":") 

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.