Re: SHA-1 hash calculate in Kernel.

2015-10-28 Thread lx
hi all: I finally implement it by learning form the function of tcp md5 checksum. This is the relative kernel source . The SHA-1 implement is here .But

Re: SHA-1 hash calculate in Kernel.

2015-08-29 Thread Bernd Petrovitsch
On Fre, 2015-08-28 at 15:36 +0800, lx wrote: [...] > //way 2 > /* > char *plaintext = kmalloc(sizeof(char), GFP_KERNEL); > plaintext = "c"; I don't think that this line doesn't give any warning ... Kind regards, Bernd -- "I dislike type abstraction if it has no real reaso

RE: SHA-1 hash calculate in Kernel.

2015-08-28 Thread Jeff Haran
From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of lx Sent: Friday, August 28, 2015 12:36 AM To: kernelnewbies Subject: SHA-1 hash calculate in Kernel. hi all: I built a module for calculate the SHA-1. The code is

Re: SHA-1 hash calculate in Kernel.

2015-08-28 Thread Bjørn Mork
lx writes: > hi all: > I built a module for calculate the SHA-1. The code is: > ## > #include > #include > #include > #include > #include > #include > MODULE_LICENSE("Dual BSD/GPL"); > > #define SHA1_LENGTH 20 > > static int hello_init(void) > { > /* > * h

SHA-1 hash calculate in Kernel.

2015-08-28 Thread lx
hi all: I built a module for calculate the SHA-1. The code is: ## #include #include #include #include #include #include MODULE_LICENSE("Dual BSD/GPL"); #define SHA1_LENGTH 20 static int hello_init(void) { /* * http://lxr.oss.org.cn/source/fs/ecryptfs/crypt