Constructs an instance of the encryption service.
This method executes decryption of data using the *PBKDF2 encryption
algorithm as implemented in crypto-js
. It uses an 256-bits
key size
and executes 1024
iterations to produce the key. Additionally, it uses
a random salt of 16 bytes
. The underlying encryption key is passed
on to the AES algorithm to perform decryption.
Note that this method accepts a ciphertext as produced by the above
CipherService.encrypt method, as such it expects a random
salt and IV to be prepended to the ciphertext.
The data that must be decrypted.
The password used to generate the decryption key (PBKDF2).
The decrypted ciphertext with the starting 32-bytes
that consist of the salt and IV.
This method executes encryption of data using the *PBKDF2 encryption
algorithm as implemented in crypto-js
. It uses an 256-bits
key size
and executes 1024
iterations to produce the key. Additionally, it uses
a random salt of 16 bytes
. The underlying encryption key is passed
on to the AES algorithm to perform encryption.
The resulting string is a ciphertext that starts with the random
salt (16 bytes), is followed by the input vector (16 bytes) and
ends with the encrypted data, i.e. the starting 32-bytes
are used
to decrypt the encrypted message.
The data that must be encrypted.
The password used to generate an encryption key (PBKDF2).
The encrypted ciphertext with the starting 32-bytes
that consist of the salt and IV.
Generated using TypeDoc
The main service for handling encryption and decryption of data across the app modules.
v0.4.0