What does the encrypt function from Stanford JS Crypto Library do? The Stanford JS Crypto Library appears to be trusted by many people. Unfortunately there isn't a lot of documentation. Their encrypt function is documented as a "simple encryption function" (that's it). The default values in the source code look like it's AES-128? Are there any restrictions on input, like length, special characters, etc?
The SJCL demo page suggests that what it's doing is symmetric-key authenticated encryption using either the CCM or the OCB2 mode.  The cipher used appears to be AES, not that that matters much.  (Any other secure block cipher with similar block and key sizes would work just as well.)

Actually peeking into the code reveals that there's more to it than that.  For example, for the encryption key, it can apparently accept either a password string (which will be hashed using PBKDF2 to derive the actual key), an ECC ElGamal public key (used to generate and encapsulate a random symmetric encryption key) or, presumably, a raw AES key in the library's internal format.

In any case, besides the demo, the sparse auto-generated documentation, and the code itself, I have not been able to find any proper documentation or specification for this library.  While at a glance the design of the library seems sound enough, and while the author list includes Dan Boneh, who certainly seems a reputable and competent enough cryptographer, I still would not recommend using this library given its lack of documentation.

Simply put, even if the library itself worked perfectly and did exactly what it was supposed to, without proper documentation you simply have no way to tell (short of reviewing the whole source code yourself) whether you're using it correctly and securely or not.  Given that most crypto failures in practice arise from putting the right parts together in the wrong way, that's a glaring flaw in my book.