随笔分类 -  ALGO

摘要:uint32_t reverse_32( uint32_t data ){ asm("rbit r0,r0"); return data;};uint32_t crc32_ether( char *buf, int len, int clear ){ uint32_t *p = (uint32... 阅读全文
posted @ 2015-06-27 13:06 IAmAProgrammer 编辑
摘要:http://supp.iar.com/Support/?note=64424&from=note+11927BackgroundThe STM32 devices from ST Micro have a built-in hardware CRC32 calculator. (So using ... 阅读全文
posted @ 2015-06-27 12:41 IAmAProgrammer 编辑
摘要:对于STM32的32位CRC,如果假定它的一个主要目的是为了校验往内部FLASH存储数据的可靠性,那么(余数)初值是全1当然是比较合理的。由于STM32的32位CRC是纯32位,即每次必须输入32位的数,所以如果数据不到32位,应该往低位用1来填充比较合理;另外,如果输入数据是 "1234"-0x3... 阅读全文
posted @ 2015-06-27 12:36 IAmAProgrammer 编辑
摘要:So, lets look at how CBC works first. The following picture shows the encryption when using CBC (in this case, using AES as the cipher).Basically, Cip... 阅读全文
posted @ 2015-06-27 00:01 IAmAProgrammer 编辑
摘要:How to convert a byte to its binary string representationFor example, the bits in a byteBare10000010, how can I assign the bits to the stringstrlitera... 阅读全文
posted @ 2015-06-26 11:53 IAmAProgrammer 编辑
摘要:how convert large HEX string to binaryI have a string with 14 characters . This is a hex represantation of 7bytes. I want to convert it to binary.int3... 阅读全文
posted @ 2015-06-26 02:53 IAmAProgrammer 编辑
摘要:http://codereview.stackexchange.com/questions/2050/tiny-encryption-algorithm-tea-for-arbitrary-sized-data#ifndef __TEA.H__#define __TEA.H__#include vo... 阅读全文
posted @ 2015-06-25 18:59 IAmAProgrammer 编辑
摘要:/* Validation sets: * * Single-length key, single-length plaintext - * Key : 0123 4567 89ab cdef * Plain : 0123 4567 89ab cde7 * Cipher : c957 442... 阅读全文
posted @ 2015-06-25 18:38 IAmAProgrammer 编辑
摘要:Table of contentList of test vectors for AES/ECB encryption modeAES ECB 128-bit encryption modeAES ECB 128-bit encryption modeAES ECB 128-bit encrypti... 阅读全文
posted @ 2015-06-19 23:26 IAmAProgrammer 编辑
摘要:This optimized AES implementation conforms to FIPS-197.aes.h#ifndef _AES_H#define _AES_H#ifndef uint8#define uint8 unsigned char#endif#ifndef uint32... 阅读全文
posted @ 2015-06-19 22:46 IAmAProgrammer 编辑
摘要:/* * FIPS-197 compliant AES implementation * * Copyright (C) 2006-2007 Christophe Devine * * Redistribution and use in source and binary forms, wi... 阅读全文
posted @ 2015-06-16 22:27 IAmAProgrammer 编辑
摘要:// advanced encryption standard// author: karl malbrain, malbrain@yahoo.comtypedef unsigned char uchar;#include #include // AES only supports Nb=4#def... 阅读全文
posted @ 2015-06-16 22:08 IAmAProgrammer 编辑
摘要:From: Will DeWitt Jr. Subject: Fast strlen routine?NewsGroup: borland.public.delphi.language.basmDate Posted: 28-May-2003 at 13:50:4 PST Download... 阅读全文
posted @ 2014-09-17 08:11 IAmAProgrammer 编辑
摘要:http://www.matrix67.com/blog/archives/3985神秘常量复出!用0x077CB531计算末尾0的个数大家或许还记得 Quake III 里面的一段有如天书般的代码,其中用到的神秘常量 0x5F3759DF 究竟是怎么一回事,着实让不少人伤透了脑筋。今天,我见到了一... 阅读全文
posted @ 2014-09-11 23:50 IAmAProgrammer 编辑
摘要:http://programming.sirrida.de/Discussion topicsBit permutationsDownload source filesList of function descriptionsOnline source code generator for bit ... 阅读全文
posted @ 2014-09-11 22:10 IAmAProgrammer 编辑
摘要:http://aggregate.org/MAGIC/The Aggregate Magic AlgorithmsThere are lots of people and places that create and collect algorithms of all types (hereare ... 阅读全文
posted @ 2014-09-11 21:15 IAmAProgrammer 编辑
摘要:http://graphics.stanford.edu/~seander/bithacks.htmlBit Twiddling HacksBy Sean Eron Andersonseander@cs.stanford.eduIndividually, thecode snippets here ... 阅读全文
posted @ 2014-09-11 21:14 IAmAProgrammer 编辑
摘要:http://blog.csdn.net/cardinal_508/article/details/5553387L13从快速入门开始(Quickstart)这个库是一个文件中所有简化用法中最常见的:FTP下载它,编译它(-03),并连接到其他程序。全部编译时默认选择合理值在大多数平台。之后你也可以... 阅读全文
posted @ 2014-09-03 22:50 IAmAProgrammer 编辑
摘要:#ifndef __MAILBOX_H__#define __MAILBOX_H__#include #include #include typedef struct{ // uint32_t Capacity; uint8_t * Memory; uint32_t MailSize; ui... 阅读全文
posted @ 2014-08-17 13:32 IAmAProgrammer 编辑
摘要:#ifndef __QUEUE_H__#define __QUEUE_H__#include #include #include /* * Queues can have more than one producer but only one consumer. * This means that ... 阅读全文
posted @ 2014-08-17 13:31 IAmAProgrammer 编辑

点击右上角即可分享
微信分享提示