Replace __kernel, __constant, __global and __local qualifiers with macro for better control
This commit is contained in:
@@ -34,7 +34,7 @@ typedef struct
|
||||
|
||||
} RC4_KEY;
|
||||
|
||||
DECLSPEC void swap (__local RC4_KEY *rc4_key, const u8 i, const u8 j)
|
||||
DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j)
|
||||
{
|
||||
u8 tmp;
|
||||
|
||||
@@ -43,12 +43,12 @@ DECLSPEC void swap (__local RC4_KEY *rc4_key, const u8 i, const u8 j)
|
||||
rc4_key->S[j] = tmp;
|
||||
}
|
||||
|
||||
DECLSPEC void rc4_init_16 (__local RC4_KEY *rc4_key, const u32 *data)
|
||||
DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data)
|
||||
{
|
||||
u32 v = 0x03020100;
|
||||
u32 a = 0x04040404;
|
||||
|
||||
__local u32 *ptr = (__local u32 *) rc4_key->S;
|
||||
LOCAL_AS u32 *ptr = (LOCAL_AS u32 *) rc4_key->S;
|
||||
|
||||
#ifdef _unroll
|
||||
#pragma unroll
|
||||
@@ -96,7 +96,7 @@ DECLSPEC void rc4_init_16 (__local RC4_KEY *rc4_key, const u32 *data)
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC u8 rc4_next_16 (__local RC4_KEY *rc4_key, u8 i, u8 j, const __global u32 *in, u32 *out)
|
||||
DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const GLOBAL_AS u32 *in, u32 *out)
|
||||
{
|
||||
#ifdef _unroll
|
||||
#pragma unroll
|
||||
@@ -234,7 +234,7 @@ DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *
|
||||
md5_transform (w0, w1, w2, w3, digest);
|
||||
}
|
||||
|
||||
DECLSPEC int decrypt_and_check (__local RC4_KEY *rc4_key, u32 *data, __global const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum)
|
||||
DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum)
|
||||
{
|
||||
rc4_init_16 (rc4_key, data);
|
||||
|
||||
@@ -574,7 +574,7 @@ DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, cons
|
||||
hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
|
||||
}
|
||||
|
||||
__kernel void m13100_m04 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
KERNEL_FQ void m13100_m04 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
{
|
||||
/**
|
||||
* modifier
|
||||
@@ -609,9 +609,9 @@ __kernel void m13100_m04 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
* shared
|
||||
*/
|
||||
|
||||
__local RC4_KEY rc4_keys[64];
|
||||
LOCAL_AS RC4_KEY rc4_keys[64];
|
||||
|
||||
__local RC4_KEY *rc4_key = &rc4_keys[lid];
|
||||
LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid];
|
||||
|
||||
/**
|
||||
* salt
|
||||
@@ -664,15 +664,15 @@ __kernel void m13100_m04 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
}
|
||||
}
|
||||
|
||||
__kernel void m13100_m08 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
KERNEL_FQ void m13100_m08 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
{
|
||||
}
|
||||
|
||||
__kernel void m13100_m16 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
KERNEL_FQ void m13100_m16 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
{
|
||||
}
|
||||
|
||||
__kernel void m13100_s04 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
KERNEL_FQ void m13100_s04 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
{
|
||||
/**
|
||||
* modifier
|
||||
@@ -707,9 +707,9 @@ __kernel void m13100_s04 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
* shared
|
||||
*/
|
||||
|
||||
__local RC4_KEY rc4_keys[64];
|
||||
LOCAL_AS RC4_KEY rc4_keys[64];
|
||||
|
||||
__local RC4_KEY *rc4_key = &rc4_keys[lid];
|
||||
LOCAL_AS RC4_KEY *rc4_key = &rc4_keys[lid];
|
||||
|
||||
/**
|
||||
* salt
|
||||
@@ -762,10 +762,10 @@ __kernel void m13100_s04 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
}
|
||||
}
|
||||
|
||||
__kernel void m13100_s08 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
KERNEL_FQ void m13100_s08 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
{
|
||||
}
|
||||
|
||||
__kernel void m13100_s16 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
KERNEL_FQ void m13100_s16 (KERN_ATTR_RULES_ESALT (krb5tgs_t))
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user