 #
 encryptData = (key, data, adata = '') ->
   if key == ''
-    console.error 'Encryption key empty!'
-    return false
+    throw new Error 'Encryption key empty!'
 
   options =
     mode : 'gcm'

    value = ''

  hash = sjcl.hash.sha256.hash value
  return sjcl.codec.hex.fromBits hash
#
decryptData = (key, data) ->
  if key == ''
    throw new Error 'Decryption key empty!'

  options_ret = {}

