Skip to content

Instantly share code, notes, and snippets.

@clowwindy
Last active August 29, 2015 14:26
Show Gist options
  • Save clowwindy/6af730e6db66253fabcf to your computer and use it in GitHub Desktop.
Save clowwindy/6af730e6db66253fabcf to your computer and use it in GitHub Desktop.
errf("opening");
FILE *f = fopen("test", "rb");
fread(ctx->udp_buf + SHADOWVPN_PACKET_OFFSET, 1, 1024, f);
if (-1 == crypto_decrypt(ctx->tun_buf, ctx->udp_buf, 1000)) {
errf("failure");
} else {
errf("success");
}
SVCrypto.setPassword("BLANKWONDER")
let c = NSData(contentsOfFile: NSBundle.mainBundle().pathForResource("test", ofType: "bin")!)
print(SVCrypto.decrypt(c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment