This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var payload = "{{ content | encrypt_data }}".split("|"); //content via Ruby | |
| var iv = payload[0] | |
| hmac = payload[1], | |
| cipherText = payload[2]; | |
| //CryptoJS keeps all objects as WordArrays, so you have to coerce as strings at times. | |
| //Only get passphrase via input or cookie, convert to sha256 hex digest | |
| //echo -n "passphrase" | openssl dgst -sha256 |