Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
encrypt - encode strings blockwise
&pagelevel(4)&pagelevel
Syntax | #include <unistd.h> void encrypt(char block[64], int edflag); |
Description encrypt() provides access to an encoding algorithm. The key that is generated by
| setkey() is used as the key to encrypt the string block with the encrypt() function. block is a character array of length 64 bytes containing only the bytes with values 0 and 1. The argument array is modified in place to a similar array which contains the bits of the argument after modification by the encoding algorithm using the key set by setkey(). If edflag is 0, the argument is encoded. The argument cannot be decoded; if this is attempted (edflag = 1), errno is set to ENOSYS. |
Errors | encrypt() will fail if: ENOSYS The functionality is not supported by the system. |
Notes | Since encrypt() does not return a value, errors can only be detected as follows: by setting
errno to 0, calling encrypt(), and then testing errno. If errno is non-zero, it may be assumed that an error has occurred. |
See also | crypt(), setkey(), unistd.h. |