Add unpackage() function to parse <v0.7 and ≥0.7 EMOTP message formats.
[easyotp.git] / try.c
blob6f322d848ab166647a35aa6194971236d7c5a6a1
1 /** Practical One-time Pad Library
3 * Created:20080514
4 * By Jeff Connelly
5 */
7 #include <stdio.h>
8 #include "libotp.h"
10 extern PAD *pads;
12 int main()
14 load_pad("/Volumes/Not Backed Up/otp/otp-dazzlement");
15 load_pad("/Volumes/Not Backed Up/otp/otp-dazzlement");
16 load_pad("/Volumes/Not Backed Up/otp/otp-dazzlement");
18 printf("offset=%ld\n", read_offset(pads));
19 write_offset(pads, 1213475);
20 printf("offset=%ld\n", read_offset(pads));
22 unpackage("--EMOTP_BEGIN--1213434,\n"
23 "gK1O22FPbxLmxrROfFHDCsM1LTsOAjjbRlHVM1p+WG+s6yslYVfzvtc=\n"
24 "--EMOTP_END--\n");
26 unpackage("--EMOTP_BEGIN--978,dc,\n"
27 "hUZm1q0gX7pa6Alzbo9OZiT8wA==\n"
28 "--EMOTP_END--\n");
30 unpackage("--EMOTP_BEGIN--1213475,\n"
31 "k7z/WLuOwZ7FUl+eCbf4nchljDYqwbgE30rMw2jawU7IyLLHsF1xnxXuDkjkL486MFeInftCSjjV\n"
32 "hMHJHq4WGbuf8JmSCiPxcyzlyMaR5rDY1jmFhLHdp9LYmXODqY1VbOGRtPn2Fp4HhMX9yW1AGEEg\n"
33 "hztze7K8ipdqd6U5SKuYNmW6YBEaZZZJg4BhbPdUjBZLYUl4VBftcXlOGWJG3A+r7RFOl3VhNrXd\n"
34 "--EMOTP_END--");
36 show_pads();
37 free_pads();
39 return 0;