Compatibility folder for both server and client?

Hi Everybody,

I am trying to incorporate the sjcl into my project. If I put it in the /client/compatibility folder, I can use it on the client - no problem. But I would also like to use it on the server. I cannot find a place to put it to use it both on the client and the server. I tried putting it in:


So, if I want to use a library, without the wrapping of code (ie: for the client, I would put it in compatibility) on both the client and the server, where to put it? :slight_smile:



There are two meteor sjcl packages you can use:

I’ve been using the mrt one successfully for quite some time.

Ok, thank you - I will use that one :slight_smile:
I tried several other packages (not for the SJCL), but got into trouble, so this time I thought I would just take the JS and throw it down somewhere. It does work, but not in the serverside… :sunglasses:

Question out of curiosity: did you use it client-side? If so, how do you protect the key? (I’m going to use it serverside and clientside. The things I will be encrypting clientside are more to protect from “peeping eyes” than anything mission critical. But of course I have been wondering how you might encrypt something with a reasonable secret key.)

Yes, used it client side. Used it in conjunction with CryptoJS for - everything is encrypted client side with layered symmetric/asymmetric keys so that the server only sees encrypted data.

1 Like