summaryrefslogtreecommitdiff
path: root/src/utils/CryptoUtils.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/CryptoUtils.scala')
-rw-r--r--src/utils/CryptoUtils.scala13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/utils/CryptoUtils.scala b/src/utils/CryptoUtils.scala
index 430934b..6c2849e 100644
--- a/src/utils/CryptoUtils.scala
+++ b/src/utils/CryptoUtils.scala
@@ -11,17 +11,4 @@ object CryptoUtils {
s ++ Stream.continually(padLength.toByte).take(padLength)
}
- def cbcDecryptInstance(cipherPrim: String, key: Seq[Byte], iv: Seq[Byte]): CBCDecrypter = {
- val keySpec = new SecretKeySpec(key.toArray, cipherPrim)
- val cipher = Cipher.getInstance(s"$cipherPrim/ECB/NoPadding")
- cipher.init(Cipher.DECRYPT_MODE, keySpec)
- new CBCDecrypter(cipher, iv)
- }
-
- def cbcEncryptInstance(cipherPrim: String, key: Seq[Byte], iv: Seq[Byte]): CBCEncrypter = {
- val keySpec = new SecretKeySpec(key.toArray, cipherPrim)
- val cipher = Cipher.getInstance(s"$cipherPrim/ECB/NoPadding")
- cipher.init(Cipher.ENCRYPT_MODE, keySpec)
- new CBCEncrypter(cipher, iv)
- }
}