encrypts expr using the specified password, to give an encrypted object.
encrypts expr using the cryptographic key specification keyspec.
interactively requests a password with which to encrypt expr.
- Encrypt yields EncryptedObject[…], suitable for decryption with Decrypt.
- Encrypt[key,"string"] yields an EncryptedObject containing the encrypted version of the contents of the string as encoded in UTF-8.
- Encrypt[key,ByteArray[…]] yields an EncryptedObject containing the encrypted version of the raw bytes in the ByteArray object.
- In a notebook interface, Encrypt[expr] generates a dialog box; in a textual interface it generates a textual prompt.
- For block ciphers, Encrypt uses the OpenSSL PKCS padding method to pad out incomplete input blocks.
- For a general expression, Encrypt[key,expr] yields an EncryptedObject essentially containing an encrypted version of Compress[expr].
- For RSA ciphers, the maximum length of data that can be encrypted is determined by the number of bytes in the modulus, and the padding mode, according to:
"PKCS1" < "SSLV23" < "OAEP" < None