Skip to content

Instantly share code, notes, and snippets.

@shanecharles
Last active October 25, 2017 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shanecharles/22171d2aa1dbc2f4afbb4c02b1a36547 to your computer and use it in GitHub Desktop.
Save shanecharles/22171d2aa1dbc2f4afbb4c02b1a36547 to your computer and use it in GitHub Desktop.
There and back properties of MSDN encryption/decryption example.
#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