20 | This module adds cryptographic services to jsolait.
21 |
public members:▲
24 |
25 |
listEncrypters()
26 | Returns an Array of all available encrypter names.
27 |
28 |
listDecrypters()
29 | Returns an Array of all available decrypter names.
30 |
31 |
globals:▲
34 |
35 |
String::encrypt(crydec)
36 | Encrypts a string using the encrypter specified by the crydec
.
37 | All parameters but the crypdec
parameter are forwardet to the encrypter.
38 |
39 |
String::decrypt(crydec)
40 | Decrypts a string using the decrypter specified by the crydec
.
41 | All parameters but the crypdec
parameter are forwardet to the decrypter.
42 |
43 |
String::encrypt_xor(key)
44 | Encrypts a string by XOR.
45 | The whole String will be XORed with the key
parameter.
46 | If the key is shorter than the String then it will be multiplied to fit the length of the String.
47 |
48 |
String::decrypt_xor
49 | Decrypts a string using XOR.
50 | Since XORing is symetric it is the same as the encrypter.
51 |
52 |
String::encrypt_rc4(key)
53 | Encrypts a string using the ARC4 algorithm.
54 | The key is a String and can be of any length.
55 |
56 |
String::decrypt_rc4
57 | Decrypts a string using the ARC4 algorithm.
58 | Since it is symetric it is the same as the encrypter.
59 |
60 |
encrypters/decrypters▲
63 |
64 | Currently there are only two encrypters/decrypters xor and rc4.
65 | If you want to add your own at runtime just extend the Stringl class by adding a
66 | String.prototype.encrypt_yourEncrypter
or
67 | String.prototype.decrypt_yourDecrypter
method.
68 |