IPWorks Encrypt 2020 Node.js Edition

Questions / Feedback?

Algorithm Property

The symmetric algorithm.

Syntax

 ezcrypt.getAlgorithm([callback])
 ezcrypt.setAlgorithm( algorithm, [callback])

Possible Values

  0 (ezAES), 
  1 (ezBlowfish), 
  2 (ezCAST), 
  3 (ezDES), 
  4 (ezIDEA), 
  5 (ezRC2), 
  6 (ezRC4), 
  7 (ezTEA), 
  8 (ezTripleDES), 
  9 (ezTwofish), 
  10 (ezRijndael), 
  11 (ezChaCha), 
  12 (ezXSalsa20)

Default Value

0

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getAlgorithm([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setAlgorithm([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This property specifies the symmetric algorithm to use. Possible values are:

  • 0 (AES - default)
  • 1 (Blowfish)
  • 2 (CAST)
  • 3 (DES)
  • 4 (IDEA)
  • 5 (RC2)
  • 6 (RC4)
  • 7 (TEA)
  • 8 (TripleDES)
  • 9 (Twofish)
  • 10 (Rijndael)
  • 11 (ChaCha)
  • 12 (XSalsa20)

Data Type

Integer

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Encrypt 2020 Node.js Edition - Version 20.0 [Build 8155]