use OC\Encryption\Exceptions\DecryptionFailedException;
use OC\Encryption\Exceptions\EncryptionFailedException;
-use OC\HintException;
use OCA\Encryption\Exceptions\MultiKeyDecryptException;
use OCA\Encryption\Exceptions\MultiKeyEncryptException;
use OCP\Encryption\Exceptions\GenericEncryptionException;
* @param string $data
* @param string $passPhrase
* @param string $expectedSignature
- * @throws HintException
+ * @throws GenericEncryptionException
*/
private function checkSignature($data, $passPhrase, $expectedSignature) {
$signature = $this->createSignature($data, $passPhrase);
if (!hash_equals($expectedSignature, $signature)) {
- throw new HintException('Bad Signature', $this->l->t('Bad Signature'));
+ throw new GenericEncryptionException('Bad Signature', $this->l->t('Bad Signature'));
}
}
* @param string $catFile
* @param string $cipher
* @return bool
- * @throws HintException
+ * @throws GenericEncryptionException
*/
private function hasSignature($catFile, $cipher) {
$meta = substr($catFile, -93);
// enforce signature for the new 'CTR' ciphers
if ($signaturePosition === false && strpos(strtolower($cipher), 'ctr') !== false) {
- throw new HintException('Missing Signature', $this->l->t('Missing Signature'));
+ throw new GenericEncryptionException('Missing Signature', $this->l->t('Missing Signature'));
}
return ($signaturePosition !== false);