Class: Toybox.Cryptography.Cipher
- Inherits:
-
Toybox.Lang.Object
Overview
A Cipher object.
See Also:
Instance Method Summary collapse
-
decrypt(ciphertext as Lang.ByteArray) as Lang.ByteArray
Decrypt data with the key, depending on how the cipher was initialized.
-
encrypt(plaintext as Lang.ByteArray) as Lang.ByteArray
Encrypt data with the key, depending on how the cipher was initialized.
-
initialize(options as { :algorithm as Cryptography.CipherAlgorithm, :mode as Cryptography.EncryptionMode, :key as Lang.ByteArray, :iv as Lang.ByteArray })
Constructor.
Instance Method Details
decrypt(ciphertext as Lang.ByteArray) as Lang.ByteArray
Decrypt data with the key, depending on how the cipher was initialized.
Decryption can be broken up into two or more calls to decrypt(). For
MODE_CBC, the ciphertext
length (in bytes) must be a multiple of the
block size.
encrypt(plaintext as Lang.ByteArray) as Lang.ByteArray
Encrypt data with the key, depending on how the cipher was initialized.
Encryption can be broken up into two or more calls to encrypt. For
MODE_CBC, the plaintext
length (in bytes) must be a multiple of the
block size.
initialize(options as { :algorithm as Cryptography.CipherAlgorithm, :mode as Cryptography.EncryptionMode, :key as Lang.ByteArray, :iv as Lang.ByteArray })
Constructor