The CryptoKey class / Examples |
IMPORT xml MAIN DEFINE key xml.CryptoKey LET key = xml.CryptoKey.Create("http://www.w3.org/2001/04/xmlenc#aes256-cbc") TRY CALL key.generateKey(NULL) DISPLAY "Key size (in bits) : ",key.getSize() # displays 256 (bits) DISPLAY "Key type : ",key.getType() # displays SYMMETRIC DISPLAY "Key usage : ",key.getUsage() # displays ENCRYPTION CATCH DISPLAY "Unable to generate key :",STATUS END TRY END MAIN