From d8f5e6d74b386045a451ed20a3c250204be8946e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 28 Jun 2014 15:57:48 +0200 Subject: [Lib] Update beaker.py to version 1.6.4 --- module/lib/beaker/crypto/jcecrypto.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/lib/beaker/crypto/jcecrypto.py') diff --git a/module/lib/beaker/crypto/jcecrypto.py b/module/lib/beaker/crypto/jcecrypto.py index 4062d513e..ce313d6e1 100644 --- a/module/lib/beaker/crypto/jcecrypto.py +++ b/module/lib/beaker/crypto/jcecrypto.py @@ -16,6 +16,7 @@ import jarray # Initialization vector filled with zeros _iv = IvParameterSpec(jarray.zeros(16, 'b')) + def aesEncrypt(data, key): cipher = Cipher.getInstance('AES/CTR/NoPadding') skeySpec = SecretKeySpec(key, 'AES') @@ -25,6 +26,7 @@ def aesEncrypt(data, key): # magic. aesDecrypt = aesEncrypt + def getKeyLength(): maxlen = Cipher.getMaxAllowedKeyLength('AES/CTR/NoPadding') return min(maxlen, 256) / 8 -- cgit v1.2.3