diff --git a/src/Plugin/EncryptionMethod/RealAESEncryptionMethod.php b/src/Plugin/EncryptionMethod/RealAESEncryptionMethod.php
index 1ed9ff9..af801d0 100644
--- a/src/Plugin/EncryptionMethod/RealAESEncryptionMethod.php
+++ b/src/Plugin/EncryptionMethod/RealAESEncryptionMethod.php
@@ -1,10 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\real_aes\Plugin\EncryptionMethod\RealAESEncryptionMethod.
- */
-
 namespace Drupal\real_aes\Plugin\EncryptionMethod;
 
 use Drupal\encrypt\EncryptionMethodInterface;
@@ -33,12 +28,12 @@ class RealAESEncryptionMethod extends EncryptionMethodBase implements Encryption
     $errors = array();
 
     if (!class_exists('\Defuse\Crypto\Crypto')) {
-      $errors[] = t('Defuse PHP Encryption library is not correctly installed.');
+      $errors[] = $this->t('Defuse PHP Encryption library is not correctly installed.');
     }
 
     // Check if the key size meets the requirement.
     if (strlen($key) != Key::KEY_BYTE_SIZE) {
-      $errors[] = t("This encryption method requires a @size byte key.", array('@size' => Key::KEY_BYTE_SIZE));
+      $errors[] = $this->t("This encryption method requires a @size byte key.", array('@size' => Key::KEY_BYTE_SIZE));
     }
 
     return $errors;
