예제 #1
0
 public static int crypto_sign_keypair(
     byte *pk,
     byte *sk)
 {
     return(_is32bits
         ? X86.crypto_sign_keypair(pk, sk)
         : X64.crypto_sign_keypair(pk, sk));
 }
예제 #2
0
 public static int crypto_sign_update(void * /* crypto_sign_state  */ state,
                                      byte *m,
                                      ulong mlen)
 {
     return(_is32bits ?
            X86.crypto_sign_update(state, m, mlen) :
            X64.crypto_sign_update(state, m, mlen));
 }
예제 #3
0
 public static int sodium_memcmp(
     byte *b1,
     byte *b2,
     UIntPtr len)
 {
     return(_is32bits ?
            X86.sodium_memcmp(b1, b2, len) :
            X64.sodium_memcmp(b1, b2, len));
 }
예제 #4
0
 public static int crypto_sign_final_create(void * /* crypto_generichash_state */ state,
                                            byte *sig,
                                            ulong *siglen_p,
                                            byte *sk)
 {
     return(_is32bits ?
            X86.crypto_sign_final_create(state, sig, siglen_p, sk) :
            X64.crypto_sign_final_create(state, sig, siglen_p, sk));
 }
예제 #5
0
 public static int crypto_generichash_init(void * /* crypto_generichash_state */ state,
                                           byte *key,
                                           UIntPtr keylen,
                                           UIntPtr outlen)
 {
     return(_is32bits ?
            X86.crypto_generichash_init(state, key, keylen, outlen) :
            X64.crypto_generichash_init(state, key, keylen, outlen));
 }
예제 #6
0
 public static int crypto_generichash_final(
     void * /* crypto_generichash_state */ state,
     byte * @out,
     UIntPtr outlen)
 {
     return(_is32bits ?
            X86.crypto_generichash_final(state, @out, outlen) :
            X64.crypto_generichash_final(state, @out, outlen));
 }
예제 #7
0
 public static int crypto_generichash_update(
     void * /* crypto_generichash_state */ state,
     byte * @in,
     ulong inlen)
 {
     return(_is32bits ?
            X86.crypto_generichash_update(state, @in, inlen) :
            X64.crypto_generichash_update(state, @in, inlen));
 }
예제 #8
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = base.GetHashCode();
         result = (result * 397) ^ (CapabilityRegPath ?? "").GetHashCode();
         result = (result * 397) ^ X64.GetHashCode();
         return(result);
     }
 }
예제 #9
0
 public static int crypto_sign_verify_detached(
     byte *sig,
     byte *m,
     ulong mlen,
     byte *pk)
 {
     return(_is32bits
         ? X86.crypto_sign_verify_detached(sig, m, mlen, pk)
         : X64.crypto_sign_verify_detached(sig, m, mlen, pk));
 }
예제 #10
0
 public static int crypto_box_seal(
     byte *b,
     byte *b1,
     ulong mlen,
     byte *pk)
 {
     return(_is32bits
         ? X86.crypto_box_seal(b, b1, mlen, pk)
         : X64.crypto_box_seal(b, b1, mlen, pk));
 }
예제 #11
0
 public static void ass_set_font_scale(IntPtr renderer, double fontScale)
 {
     if (Is64Bit)
     {
         X64.ass_set_font_scale(renderer, fontScale);
     }
     else
     {
         X86.ass_set_font_scale(renderer, fontScale);
     }
 }
예제 #12
0
 public static int crypto_kdf_derive_from_key(
     byte *subkey,
     UIntPtr subkeylen,
     ulong subkeyid,
     byte *ctx,
     byte *key)
 {
     return(_is32bits
         ? X86.crypto_kdf_derive_from_key(subkey, subkeylen, subkeyid, ctx, key)
         : X64.crypto_kdf_derive_from_key(subkey, subkeylen, subkeyid, ctx, key));
 }
예제 #13
0
 public static void ass_set_hinting(IntPtr renderer, Hinting hinting)
 {
     if (Is64Bit)
     {
         X64.ass_set_hinting(renderer, hinting);
     }
     else
     {
         X86.ass_set_hinting(renderer, hinting);
     }
 }
예제 #14
0
 public static void ass_set_line_position(IntPtr renderer, double linePosition)
 {
     if (Is64Bit)
     {
         X64.ass_set_line_position(renderer, linePosition);
     }
     else
     {
         X86.ass_set_line_position(renderer, linePosition);
     }
 }
예제 #15
0
 public static void ass_process_force_style(IntPtr track)
 {
     if (Is64Bit)
     {
         X64.ass_process_force_style(track);
     }
     else
     {
         X86.ass_process_force_style(track);
     }
 }
예제 #16
0
 public static int ass_library_version()
 {
     if (Is64Bit)
     {
         return(X64.ass_library_version());
     }
     else
     {
         return(X86.ass_library_version());
     }
 }
예제 #17
0
 public static void ass_set_style_overrides(IntPtr library, IntPtr list)
 {
     if (Is64Bit)
     {
         X64.ass_set_style_overrides(library, list);
     }
     else
     {
         X86.ass_set_style_overrides(library, list);
     }
 }
예제 #18
0
 public static IntPtr ass_library_done(IntPtr library)
 {
     if (Is64Bit)
     {
         return(X64.ass_library_done(library));
     }
     else
     {
         return(X86.ass_library_done(library));
     }
 }
예제 #19
0
 public static void ass_set_fonts_dir(IntPtr library, [CanBeNull] string fontsDir)
 {
     if (Is64Bit)
     {
         X64.ass_set_fonts_dir(library, fontsDir);
     }
     else
     {
         X86.ass_set_fonts_dir(library, fontsDir);
     }
 }
예제 #20
0
 public static void ass_set_selective_style_override_enabled(IntPtr renderer, OverrideBits bits)
 {
     if (Is64Bit)
     {
         X64.ass_set_selective_style_override_enabled(renderer, bits);
     }
     else
     {
         X86.ass_set_selective_style_override_enabled(renderer, bits);
     }
 }
예제 #21
0
 public static void ass_set_fonts(IntPtr renderer, [CanBeNull] string defaultFont, [CanBeNull] string defaultFamily, DefaultFontProvider fontProvider, [CanBeNull] string config, bool update)
 {
     if (Is64Bit)
     {
         X64.ass_set_fonts(renderer, defaultFont, defaultFamily, fontProvider, config, update);
     }
     else
     {
         X86.ass_set_fonts(renderer, defaultFont, defaultFamily, fontProvider, config, update);
     }
 }
예제 #22
0
 public static void ass_get_available_font_providers(IntPtr library, out IntPtr providers, out UIntPtr size)
 {
     if (Is64Bit)
     {
         X64.ass_get_available_font_providers(library, out providers, out size);
     }
     else
     {
         X86.ass_get_available_font_providers(library, out providers, out size);
     }
 }
예제 #23
0
 public static int crypto_sign_detached(
     byte *sig,
     ulong *siglen,
     byte *m,
     ulong mlen,
     byte *sk)
 {
     return(_is32bits
         ? X86.crypto_sign_detached(sig, siglen, m, mlen, sk)
         : X64.crypto_sign_detached(sig, siglen, m, mlen, sk));
 }
예제 #24
0
 public static void ass_set_message_cb(IntPtr library, IntPtr callback, IntPtr userData)
 {
     if (Is64Bit)
     {
         X64.ass_set_message_cb(library, callback, userData);
     }
     else
     {
         X86.ass_set_message_cb(library, callback, userData);
     }
 }
예제 #25
0
 public static void ass_set_extract_fonts(IntPtr library, bool extract)
 {
     if (Is64Bit)
     {
         X64.ass_set_extract_fonts(library, extract);
     }
     else
     {
         X86.ass_set_extract_fonts(library, extract);
     }
 }
예제 #26
0
 public static void ass_set_line_spacing(IntPtr renderer, double lineSpacing)
 {
     if (Is64Bit)
     {
         X64.ass_set_line_spacing(renderer, lineSpacing);
     }
     else
     {
         X86.ass_set_line_spacing(renderer, lineSpacing);
     }
 }
예제 #27
0
 public static void ass_set_use_margins(IntPtr renderer, bool use)
 {
     if (Is64Bit)
     {
         X64.ass_set_use_margins(renderer, use);
     }
     else
     {
         X86.ass_set_use_margins(renderer, use);
     }
 }
예제 #28
0
 public static IntPtr ass_library_init()
 {
     if (Is64Bit)
     {
         return(X64.ass_library_init());
     }
     else
     {
         return(X86.ass_library_init());
     }
 }
예제 #29
0
 public static void ass_set_pixel_aspect(IntPtr renderer, double pixelAspectRatio)
 {
     if (Is64Bit)
     {
         X64.ass_set_pixel_aspect(renderer, pixelAspectRatio);
     }
     else
     {
         X86.ass_set_pixel_aspect(renderer, pixelAspectRatio);
     }
 }
예제 #30
0
 public static void ass_set_aspect_ratio(IntPtr renderer, double displayAspectRatio, double storageAspectRatio)
 {
     if (Is64Bit)
     {
         X64.ass_set_aspect_ratio(renderer, displayAspectRatio, storageAspectRatio);
     }
     else
     {
         X86.ass_set_aspect_ratio(renderer, displayAspectRatio, storageAspectRatio);
     }
 }
예제 #31
0
 protected abstract void EmitCode(NodeFactory factory, ref X64.X64Emitter instructionEncoder, bool relocsOnly);