Core Function DecryptString
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> DecryptString( <expression>, <password> ) </pre> === Description === Decrypt a string with a given password. === Parameters === ==== expression ==== The string to decr...") |
m (1 revision) |
||
(3 intermediate revisions by one user not shown) | |||
Line 25: | Line 25: | ||
=== Remarks === | === Remarks === | ||
− | + | It uses a secure TripleDES. | |
=== Example === | === Example === | ||
Line 38: | Line 38: | ||
Printf("Encrypted string: {0}\n",$EncryptedString); | Printf("Encrypted string: {0}\n",$EncryptedString); | ||
Printf("Decrypted string: {0}\n",$DecryptedString); | Printf("Decrypted string: {0}\n",$DecryptedString); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Latest revision as of 12:38, 14 June 2015
DecryptString( <expression>, <password> )
Contents |
Description
Decrypt a string with a given password.
Parameters
expression
The string to decrypt.
password
The password to decrypt it with.
Return Value
Success: Returns decrypted string.
Failure: Returns empty string.
Remarks
It uses a secure TripleDES.
Example
$Msg = "This is my secret message for sure yea"; $Password = "secret"; $EncryptedString = EncryptString($Msg, $Password); $DecryptedString = DecryptString($EncryptedString, $Password); Printf("Message: {0}\n",$Msg); Printf("Password: {0}\n",$Password); Printf("Encrypted string: {0}\n",$EncryptedString); Printf("Decrypted string: {0}\n",$DecryptedString);