本文整理汇总了C++中GETU32函数的典型用法代码示例。如果您正苦于以下问题:C++ GETU32函数的具体用法?C++ GETU32怎么用?C++ GETU32使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GETU32函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: aes_init_key
int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
int i;
unsigned int key_len, mode;
mode = EVP_CIPHER_CTX_mode(ctx) - 1;
key_len = (ctx->key_len)/8 - 2;
REG_MODE = 0x20;
REG_AES = BC_INI(0, key_len, enc, mode, 0);
for (i = 0; i < (4 + key_len * 2); i++)
REG_KEY(i) = GETU32(key + i * 4);
if (!mode) {
for (i = 0; i < 4; i++)
REG_IV(i) = GETU32(iv + i * 4);
}
// Key expension
REG_AES = KEXP(0, key_len, enc, mode, 0);
return 1;
}
开发者ID:zhjwpku,项目名称:hw_engine,代码行数:26,代码来源:hw_aes.c
示例2: Camellia_DecryptBlock
void
Camellia_DecryptBlock(const int keyBitLength,
const unsigned char *ciphertext,
const uint32_t *subkey,
unsigned char *plaintext)
{
uint32_t tmp[4];
tmp[0] = GETU32(ciphertext);
tmp[1] = GETU32(ciphertext + 4);
tmp[2] = GETU32(ciphertext + 8);
tmp[3] = GETU32(ciphertext + 12);
switch (keyBitLength) {
case 128:
camellia_decrypt128(subkey, tmp);
break;
case 192:
/* fall through */
case 256:
camellia_decrypt256(subkey, tmp);
break;
default:
break;
}
PUTU32(plaintext, tmp[0]);
PUTU32(plaintext+4, tmp[1]);
PUTU32(plaintext+8, tmp[2]);
PUTU32(plaintext+12, tmp[3]);
}
开发者ID:edgar-pek,项目名称:PerspicuOS,代码行数:31,代码来源:camellia.c
示例3: AES_ctr128_inc
/* increment counter (128-bit int) by 1 */
static void AES_ctr128_inc(unsigned char *counter) {
unsigned long c;
/* Grab bottom dword of counter and increment */
c = GETU32(counter + 12);
c++; c &= 0xFFFFFFFF;
PUTU32(counter + 12, c);
/* if no overflow, we're done */
if (c)
return;
/* Grab 1st dword of counter and increment */
c = GETU32(counter + 8);
c++; c &= 0xFFFFFFFF;
PUTU32(counter + 8, c);
/* if no overflow, we're done */
if (c)
return;
/* Grab 2nd dword of counter and increment */
c = GETU32(counter + 4);
c++; c &= 0xFFFFFFFF;
PUTU32(counter + 4, c);
/* if no overflow, we're done */
if (c)
return;
/* Grab top dword of counter and increment */
c = GETU32(counter + 0);
c++; c &= 0xFFFFFFFF;
PUTU32(counter + 0, c);
}
开发者ID:1310701102,项目名称:sl4a,代码行数:36,代码来源:aes_ctr.c
示例4: AES_ctr128_inc
/* increment counter (128-bit int) by 2^64 */
void AES_ctr128_inc(unsigned char *counter) {
unsigned long c;
/* Grab 3rd dword of counter and increment */
#ifdef L_ENDIAN
c = GETU32(counter + 8);
c++;
PUTU32(counter + 8, c);
#else
c = GETU32(counter + 4);
c++;
PUTU32(counter + 4, c);
#endif
/* if no overflow, we're done */
if (c)
return;
/* Grab top dword of counter and increment */
#ifdef L_ENDIAN
c = GETU32(counter + 12);
c++;
PUTU32(counter + 12, c);
#else
c = GETU32(counter + 0);
c++;
PUTU32(counter + 0, c);
#endif
}
开发者ID:ohayak,项目名称:tars_code,代码行数:31,代码来源:aes_ctr.c
示例5: do_append
int do_append(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,inode_src;
EAT(ptr,filename,lv,'(');
GETU32(inode,ptr);
EAT(ptr,filename,lv,',');
GETU32(inode_src,ptr);
EAT(ptr,filename,lv,')');
return fs_log_append(ts,inode,inode_src);
}
开发者ID:alexmiao,项目名称:moosefs,代码行数:9,代码来源:restore.c
示例6: do_append
uint8_t do_append(uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,inode_src;
EAT(ptr,lv,'(');
GETU32(inode,ptr);
EAT(ptr,lv,',');
GETU32(inode_src,ptr);
EAT(ptr,lv,')');
return shadow_fs_append(ts,inode,inode_src);
}
开发者ID:andyqzb,项目名称:shadow-mfs,代码行数:9,代码来源:replay.c
示例7: do_emptytrash
uint8_t do_emptytrash(uint64_t lv,uint32_t ts,char *ptr) {
uint32_t reservedinodes,freeinodes;
EAT(ptr,lv,'(');
EAT(ptr,lv,')');
EAT(ptr,lv,':');
GETU32(freeinodes,ptr);
EAT(ptr,lv,',');
GETU32(reservedinodes,ptr);
return shadow_fs_emptytrash(ts,freeinodes,reservedinodes);
}
开发者ID:andyqzb,项目名称:shadow-mfs,代码行数:10,代码来源:replay.c
示例8: do_aquire
uint8_t do_aquire(uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,cuid;
(void)ts;
EAT(ptr,lv,'(');
GETU32(inode,ptr);
EAT(ptr,lv,',');
GETU32(cuid,ptr);
EAT(ptr,lv,')');
return fs_aquire(inode,cuid);
}
开发者ID:chengyishi,项目名称:moosefs,代码行数:10,代码来源:restore.c
示例9: do_release
uint8_t do_release(uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,cuid;
(void)ts;
EAT(ptr,lv,'(');
GETU32(inode,ptr);
EAT(ptr,lv,',');
GETU32(cuid,ptr);
EAT(ptr,lv,')');
return shadow_fs_release(inode,cuid);
}
开发者ID:andyqzb,项目名称:shadow-mfs,代码行数:10,代码来源:replay.c
示例10: do_emptytrash
int do_emptytrash(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint32_t reservedinodes,freeinodes;
EAT(ptr,filename,lv,'(');
EAT(ptr,filename,lv,')');
EAT(ptr,filename,lv,':');
GETU32(freeinodes,ptr);
EAT(ptr,filename,lv,',');
GETU32(reservedinodes,ptr);
return fs_log_emptytrash(ts,freeinodes,reservedinodes);
}
开发者ID:alexmiao,项目名称:moosefs,代码行数:10,代码来源:restore.c
示例11: rijndaelKeySetupEnc_Master
void rijndaelKeySetupEnc_Master(u32 *rk, const u8 cipherKey[], int rank)
{
rk[0] = GETU32(cipherKey );
rk[1] = GETU32(cipherKey + 4);
rk[2] = GETU32(cipherKey + 8);
rk[3] = GETU32(cipherKey + 12);
int * rk_sign = (int*)rk;
MPI_Send(rk_sign, 4, MPI_INT, rank + 1, 0, MPI_COMM_WORLD);
}
开发者ID:iot-locus,项目名称:kernels,代码行数:10,代码来源:aes_mpi.c
示例12: do_reinit
/*
int do_reinit(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,indx;
uint64_t chunkid;
EAT(ptr,filename,lv,'(');
GETU32(inode,ptr);
EAT(ptr,filename,lv,',');
GETU32(indx,ptr);
EAT(ptr,filename,lv,')');
EAT(ptr,filename,lv,':');
GETU64(chunkid,ptr);
return fs_log_reinit(ts,inode,indx,chunkid);
}
*/
int do_release(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,cuid;
(void)ts;
EAT(ptr,filename,lv,'(');
GETU32(inode,ptr);
EAT(ptr,filename,lv,',');
GETU32(cuid,ptr);
EAT(ptr,filename,lv,')');
return fs_log_release(inode,cuid);
}
开发者ID:alexmiao,项目名称:moosefs,代码行数:24,代码来源:restore.c
示例13: do_repair
int do_repair(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,indx;
uint32_t version;
EAT(ptr,filename,lv,'(');
GETU32(inode,ptr);
EAT(ptr,filename,lv,',');
GETU32(indx,ptr);
EAT(ptr,filename,lv,')');
EAT(ptr,filename,lv,':');
GETU32(version,ptr);
return fs_log_repair(ts,inode,indx,version);
}
开发者ID:alexmiao,项目名称:moosefs,代码行数:12,代码来源:restore.c
示例14: do_unlink
int do_unlink(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,parent;
uint8_t name[256];
EAT(ptr,filename,lv,'(');
GETU32(parent,ptr);
EAT(ptr,filename,lv,',');
GETNAME(name,ptr,filename,lv,')');
EAT(ptr,filename,lv,')');
EAT(ptr,filename,lv,':');
GETU32(inode,ptr);
return fs_log_unlink(ts,parent,strlen((char*)name),name,inode);
}
开发者ID:alexmiao,项目名称:moosefs,代码行数:12,代码来源:restore.c
示例15: do_trunc
int do_trunc(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,indx;
uint64_t chunkid;
EAT(ptr,filename,lv,'(');
GETU32(inode,ptr);
EAT(ptr,filename,lv,',');
GETU32(indx,ptr);
EAT(ptr,filename,lv,')');
EAT(ptr,filename,lv,':');
GETU64(chunkid,ptr);
return fs_log_trunc(ts,inode,indx,chunkid);
}
开发者ID:alexmiao,项目名称:moosefs,代码行数:12,代码来源:restore.c
示例16: do_trunc
uint8_t do_trunc(uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,indx;
uint64_t chunkid;
EAT(ptr,lv,'(');
GETU32(inode,ptr);
EAT(ptr,lv,',');
GETU32(indx,ptr);
EAT(ptr,lv,')');
EAT(ptr,lv,':');
GETU64(chunkid,ptr);
return shadow_fs_trunc(ts,inode,indx,chunkid);
}
开发者ID:andyqzb,项目名称:shadow-mfs,代码行数:12,代码来源:replay.c
示例17: do_unlink
uint8_t do_unlink(uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,parent;
uint8_t name[256];
EAT(ptr,lv,'(');
GETU32(parent,ptr);
EAT(ptr,lv,',');
GETNAME(name,ptr,lv,')');
EAT(ptr,lv,')');
EAT(ptr,lv,':');
GETU32(inode,ptr);
return shadow_fs_unlink(ts,parent,strlen((char*)name),name,inode);
}
开发者ID:andyqzb,项目名称:shadow-mfs,代码行数:12,代码来源:replay.c
示例18: do_repair
uint8_t do_repair(uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,indx;
uint32_t version;
EAT(ptr,lv,'(');
GETU32(inode,ptr);
EAT(ptr,lv,',');
GETU32(indx,ptr);
EAT(ptr,lv,')');
EAT(ptr,lv,':');
GETU32(version,ptr);
return shadow_fs_repair(ts,inode,indx,version);
}
开发者ID:andyqzb,项目名称:shadow-mfs,代码行数:12,代码来源:replay.c
示例19: do_setgoal
int do_setgoal(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
#if VERSHEX>=0x010700
uint32_t inode,uid,ci,nci,npi,qei;
#else
uint32_t inode,uid,ci,nci,npi;
#endif
uint8_t goal,smode;
EAT(ptr,filename,lv,'(');
GETU32(inode,ptr);
EAT(ptr,filename,lv,',');
GETU32(uid,ptr);
EAT(ptr,filename,lv,',');
GETU32(goal,ptr);
EAT(ptr,filename,lv,',');
GETU32(smode,ptr);
EAT(ptr,filename,lv,')');
EAT(ptr,filename,lv,':');
GETU32(ci,ptr);
EAT(ptr,filename,lv,',');
GETU32(nci,ptr);
EAT(ptr,filename,lv,',');
GETU32(npi,ptr);
#if VERSHEX>=0x010700
if (*ptr==',') {
EAT(ptr,filename,lv,',');
GETU32(qei,ptr);
} else {
qei = UINT32_C(0xFFFFFFFF);
}
return fs_log_setgoal(ts,inode,uid,goal,smode,ci,nci,npi,qei);
#else
return fs_log_setgoal(ts,inode,uid,goal,smode,ci,nci,npi);
#endif
}
开发者ID:alexmiao,项目名称:moosefs,代码行数:34,代码来源:restore.c
示例20: do_snapshot
int do_snapshot(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,parent,canoverwrite;
uint8_t name[256];
EAT(ptr,filename,lv,'(');
GETU32(inode,ptr);
EAT(ptr,filename,lv,',');
GETU32(parent,ptr);
EAT(ptr,filename,lv,',');
GETNAME(name,ptr,filename,lv,',');
EAT(ptr,filename,lv,',');
GETU32(canoverwrite,ptr);
EAT(ptr,filename,lv,')');
return fs_log_snapshot(ts,inode,parent,strlen((char*)name),name,canoverwrite);
}
开发者ID:alexmiao,项目名称:moosefs,代码行数:14,代码来源:restore.c
注:本文中的GETU32函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论