 #
 generateSalt = (length = 2) ->
   rand = sjcl.random.randomWords length
-  
+
   return sjcl.codec.hex.fromBits rand
 
 # Encrypt data with key

#
generateKey = (password, salt) ->
  if password == ''
    console.error 'Password for key generation empty!'
    return false

  hex = sjcl.codec.hex.fromBits


#
encryptData = (key, data, adata = '') ->
  if key == ''
    throw new Error 'Encryption key empty!'

  options =
    mode : 'gcm'
