# innovaphone.crypto

// RC4 var plain = "plaintext"; var cipher = innovaphone.crypto.rc4("key", plain); var decrypted = innovaphone.crypto.rc4("key", cipher); document.getElementById("out").innerHTML = decrypted; // SHA256 var hash = innovaphone.crypto.sha256(plain); document.getElementById("out").innerHTML += "<br>" + hash;

## innovaphone.crypto

A library that contains various cryptographic functions and tools for using them.

md5(in)
  Calculates the MD5 hash of the string "in" and returns a hex string representing the hash value.
sha1(in)
  Calculates the SHA1 hash of the string "in" and returns a hex string representing the hash value.
sha256(in)
  Calculates the SHA256 hash of the string "in" and returns a hex string representing the hash value.
rc4(key, in)
  Encrypts/decrypts the data from "in" using "key" and returns the ecrypted/decrypted value. The encrypted string
rc4Bytes(keyBytes, strBytes)
  Encrypts/decrypts the data from "strBytes" using "keyBytes" and returns the ecrypted/decrypted value. The encrypted string
ntlmResponse(password, challenge)
  Calculates the NTLMv1 response based on the given password and challenge.
ntlmSessionKey(password)
  Calculates the NTLMv1 response for the given password.
str2hex(in)
  Converts the input to a hex string.
hex2str(in)
  Converts the hex string in the input to raw data. The output might be binary data.
scramble(name, value)
  Returns an non-human readable version of value, scrambled using the given name.
scramble(name, value)
  Reverts a value returned by scramble into a human-readable version.
hex2bin(input)
  Converts a hex string to a binary array.