This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
The documentation is correct. The confusion may be in the name of the method decrypt_password, because it is used to both encrypt and decrypt a password. To encrypt a password, the user would set mode to either 2 or 3 and the encrypted_password would be a non-encrypted string. To decrypt an encrypted password, the user would set mode to 0 and the encrypted_password would be an encrypted string from a previous Machine(2) or User(3) mode encryption.
Returns a string of encrypted or decrypted text. Works with user and machine encryption.