rycros.blogg.se

Key for x mirage ver 1.2.0
Key for x mirage ver 1.2.0






key for x mirage ver 1.2.0
  1. #Key for x mirage ver 1.2.0 mod
  2. #Key for x mirage ver 1.2.0 software

Let cmd = Printf.sprintf "openssl dgst -binary -sha256 %s | openssl base64" filename in Let filename = Filename.temp_file "conex" "b64" inĬonex_unix_persistency.write_replace filename data >= fun () -> | Error x when x = "broken" -> Error `InvalidSignature Let _ = Conex_unix_persistency.remove (filename ^ ".txt")Īnd _ = Conex_unix_persistency.remove (filename ^ ".key")Īnd _ = Conex_unix_persistency.remove (filename ^ ".sig")Īnd _ = Conex_unix_persistency.remove filename Let res = if 0 = Sys.command cmd then Ok () else Error "broken" in Let cmd = Printf.sprintf "openssl dgst -sha256 -verify %s.key -sigopt rsa_padding_mode:pss -signature %s.sig %s.txt > /dev/null" filename filename filename in Let filename = Filename.temp_file "conex" "sig" inĬonex_unix_persistency.write_replace (filename ^ ".key") key >= fun () ->Ĭonex_unix_persistency.write_replace (filename ^ ".txt") data >= fun () ->Ĭonex_unix_persistency.write_replace (filename ^ ".sig") signature >= fun () -> If i words - 1 || padding words - 1 || padding Error `InvalidBase64Encoding) >= fun signature -> Let n = (a lsl 18) lor (b lsl 12) lor (c lsl 6) lor d inīt output (3 * i + 0) (char_of_int x) Let a = of_char ?alphabet (may_pad i 0) (String.get input (4 * i + 0))Īnd b = of_char ?alphabet (may_pad i 1) (String.get input (4 * i + 1))Īnd c = of_char ?alphabet (may_pad i 2) (String.get input (4 * i + 2))Īnd d = of_char ?alphabet (may_pad i 3) (String.get input (4 * i + 3)) in Let may_pad i idx = i = words - 1 & idx >= padding in Let output = Bytes.make (words * 3 - padding) '\000' in

#Key for x mirage ver 1.2.0 mod

If may & x = padding then 0 else String.index alphabet xĮlse input ^ (String.make (4 - length mod 4) padding) Let of_char ?(alphabet= default_alphabet) may x = Let default_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR

#Key for x mirage ver 1.2.0 software

* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

key for x mirage ver 1.2.0

* copyright notice and this permission notice appear in all copies. * purpose with or without fee is hereby granted, provided that the above

key for x mirage ver 1.2.0

* Permission to use, copy, modify, and distribute this software for any * Copyright (c) 2006-2009 Citrix Systems Inc. We could depend on base64/b64decode/., but that's too much of a hassle.Īdded checks when padding may occur to bail out early (* why we have base64 here? well, OpenSSL seems to not be able to do base64 correctlyĬommand: echo -n 6w= | openssl base64 -dĬommand: echo 6w= | openssl base64 -d | hexdump








Key for x mirage ver 1.2.0