Last active
October 25, 2017 01:38
-
-
Save shanecharles/22171d2aa1dbc2f4afbb4c02b1a36547 to your computer and use it in GitHub Desktop.
There and back properties of MSDN encryption/decryption example.
This file contains 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
#I "packages/FsCheck/lib/net452/" | |
#r "FsCheck.dll" | |
#I "artifacts/" | |
#r "ThereAndBack.dll" | |
open FsCheck | |
open System | |
let ``Check there and back of DateTime encryption`` (input : DateTime) = | |
let encryption = ThereAndBack.Encryption () | |
input = (input.ToString() | |
|> encryption.EncryptStringToBytes_Aes | |
|> encryption.DecryptStringFromBytes_Aes | |
|> DateTime.Parse) | |
Check.Quick ``Check there and back of DateTime encryption`` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment