Made the encryption use the weights