mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-13 19:28:56 +00:00
Merge branch 'master' of https://github.com/hashcat/oclHashcat
This commit is contained in:
commit
cd430d5687
@ -282,6 +282,7 @@ static inline u32x rotl32 (const u32x a, const u32 n)
|
||||
return rotate (a, n);
|
||||
}
|
||||
|
||||
#if CUDA_ARCH >= 350
|
||||
static inline u64 rotr64 (const u64 a, const u32 n)
|
||||
{
|
||||
u32 il;
|
||||
@ -309,6 +310,12 @@ static inline u64 rotr64 (const u64 a, const u32 n)
|
||||
|
||||
return r;
|
||||
}
|
||||
#else
|
||||
static inline u64 rotr64 (const u64 a, const u32 n)
|
||||
{
|
||||
return rotate (a, (u64) 64 - n);
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline u64 rotl64 (const u64 a, const u32 n)
|
||||
{
|
||||
|
16
src/shared.c
16
src/shared.c
@ -448,13 +448,13 @@ int base32_encode (u8 (*f) (const u8), const u8 *in_buf, int in_len, u8 *out_buf
|
||||
out_ptr += 8;
|
||||
}
|
||||
|
||||
int out_len = (in_len * 8) / 5;
|
||||
int out_len = (int) (((0.5 + (float) in_len) * 8) / 5); // ceil (in_len * 8 / 5)
|
||||
|
||||
for (int i = 0; i < (7 - (in_len % 7)); i++)
|
||||
while (out_len % 8)
|
||||
{
|
||||
out_len++;
|
||||
|
||||
out_buf[out_len] = '=';
|
||||
|
||||
out_len++;
|
||||
}
|
||||
|
||||
return out_len;
|
||||
@ -515,13 +515,13 @@ int base64_encode (u8 (*f) (const u8), const u8 *in_buf, int in_len, u8 *out_buf
|
||||
out_ptr += 4;
|
||||
}
|
||||
|
||||
int out_len = (in_len * 8) / 6;
|
||||
int out_len = (int) (((0.5 + (float) in_len) * 8) / 6); // ceil (in_len * 8 / 6)
|
||||
|
||||
for (int i = 0; i < (3 - (in_len % 3)); i++)
|
||||
while (out_len % 4)
|
||||
{
|
||||
out_len++;
|
||||
|
||||
out_buf[out_len] = '=';
|
||||
|
||||
out_len++;
|
||||
}
|
||||
|
||||
return out_len;
|
||||
|
Loading…
Reference in New Issue
Block a user