EncryptedObject

EncryptedObject[assoc]

represents encrypted data generated by Encrypt.

Details

  • EncryptedObject[]["prop"] yields properties of the encrypted object. Possible properties include:
  • "Cipher"encryption algorithm used
    "BlockMode"block chaining mode for block ciphers
    "Data"encrypted data as a ByteArray object
    "InitializationVector"initialization vector
    "OriginalForm"the form of expression provided to Encrypt
  • EncryptedObject[]["Parameters"] gives all the information contained in the object as an association.
  • EncryptedObject[]["Properties"] gives a list of available properties.
  • Normal[EncryptedObject[]] gives a ByteArray[] object containing raw bytes suitable for transmission to external programs. (Note that for most methods, decryption requires both the key and the initialization vector.)
  • Possible values for the "OriginalForm" property are "Expression", "String", and "ByteArray". The setting for "OriginalForm" determines the form of expression produced by Decrypt when applied to the EncryptedObject.

Examples

open allclose all

Basic Examples  (1)

Get an encrypted object by encrypting a message:

Get a property of the encrypted object:

Get all the details contained in an EncryptedObject:

Scope  (2)

Create an EncryptedObject from byte array data encrypted with RSA:

Specify the details used for encryptioncipher, padding mode and format of the plaintext message:

Decrypt using the correct key:

Create an EncryptedObject from byte array data and initialization vector, encrypted with a symmetric cipher:

Specify the details used for encryptioncipher, block mode, initialization vector and format of the plaintext message:

Decrypt using the correct password or key:

Wolfram Research (2015), EncryptedObject, Wolfram Language function, https://reference.wolfram.com/language/ref/EncryptedObject.html (updated 2021).

Text

Wolfram Research (2015), EncryptedObject, Wolfram Language function, https://reference.wolfram.com/language/ref/EncryptedObject.html (updated 2021).

CMS

Wolfram Language. 2015. "EncryptedObject." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/EncryptedObject.html.

APA

Wolfram Language. (2015). EncryptedObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EncryptedObject.html

BibTeX

@misc{reference.wolfram_2024_encryptedobject, author="Wolfram Research", title="{EncryptedObject}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/EncryptedObject.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_encryptedobject, organization={Wolfram Research}, title={EncryptedObject}, year={2021}, url={https://reference.wolfram.com/language/ref/EncryptedObject.html}, note=[Accessed: 21-November-2024 ]}