| command: | ns_mcrypt algorithms |
| result: | list of available cipher algorithms |
| example: | [ns_mcrypt algorithms]=<%=[ns_mcrypt algorithms]%> |
| command: | ns_mcrypt modes |
| result: | list of available cipher modes |
| example: | [ns_mcrypt modes]=<%=[ns_mcrypt modes]%> |
| command: | ns_mcrypt capability -algo algorithm_name |
| parameters: | algorithm_name - name of cipher algorithm: des, blowfish, rijndael-256, ... |
| result: | list of capability for algorithm_name |
| result description: |
• 0. index of list ([lindex 0 $result]) - 0 if ran self test on specified algorithm succeeds or 1. • 1. index of list ([lindex 1 $result]) - 1 if the specified algorithm is a block algorithm or 0 if it is a stream algorithm. • 2. index of list ([lindex 2 $result]) - The block size of the specified algorithm. • 3. index of list ([lindex 3 $result]) - Maximum supported key size of the specified algorithm • 4. index of list ([lindex 4 $result]) - Key sizes supported by the specified algorithm. If sizes is 0 then all key sizes between 1 and maximum key size are supported by the algorithm. If it is 1 then only the maximum key size is supported. If it is greater than 1 then that number specifies the number of elements in sizes which are the key sizes that the algorithm supports. • 5. index of list ([lindex 5 $result]) - List of key sizes that the algorithm supports or is not set. See above. |
| example: | [ns_mcrypt capability -algo "rijndael-256"]=<%=[ns_mcrypt capability -algo "rijndael-256"]%> |
| command: | ns_mcrypt capability -mode mode_name |
| parameters: | algorithm_name - name of cipher algorithm: des, blowfish, rijndael-256, ... |
| result: | list of capability for algorithm_name |
| result description: |
• 0. index of list ([lindex 0 $result]) - 1 if the specified mode outputs blocks of bytes or 0 if it outputs bytes. (eg. 1 for cbc and ecb, and 0 for cfb and stream). • 1. index of list ([lindex 1 $result]) - 1 if the specified mode is for use with block algorithms, otherwise it returns 0. (eg. 0 for stream, and 1 for cbc, cfb, ofb). |
| example: | [ns_mcrypt capability -mode "cbc"]=<%=[ns_mcrypt capability -mode "cbc"]%> |