Team:Davidson-Missouri Western/Tables of Outputs
From 2008.igem.org
Krmuscalino (Talk | contribs) |
Krmuscalino (Talk | contribs) |
||
Line 14: | Line 14: | ||
%indicated message length | %indicated message length | ||
function test = Testhash128(X,Y,L) %L=length of message, X,Y ascii | function test = Testhash128(X,Y,L) %L=length of message, X,Y ascii | ||
- | |||
- | |||
---- | ---- | ||
Line 28: | Line 26: | ||
This code hashes all messages with the spoke model to any fixed amount of characters in the output. The user must input a message in string format, a key (one character) in string format, the number of characters in the user's alphabet, and the number of characters desired in the output. This code assumes that the decimal value of the starting character of the alphabet is 0. | This code hashes all messages with the spoke model to any fixed amount of characters in the output. The user must input a message in string format, a key (one character) in string format, the number of characters in the user's alphabet, and the number of characters desired in the output. This code assumes that the decimal value of the starting character of the alphabet is 0. | ||
- | |||
- |
Revision as of 21:05, 29 October 2008
Table Generators
for split and spoke model, makes table of what both models get as hash %value for each message combination and key of indicated alphabet and %message length function test = Testhash(X,Y,L) %L=length of message, X is smallest ascii character in alphabet,Y is largest ascii character in alphabet
%for split and spoke model, makes table of what both models get as hash %value for each message combination and key of full ascii alphabet and %indicated message length function test = Testhash128(X,Y,L) %L=length of message, X,Y ascii
The Models
This code hashes all messages with the split model to a single character in the output. The user must input a message in string format and a key (one character) in string format.
This code hashes all messages with the spoke model to any fixed amount of characters in the output. The user must input a message in string format, a key (one character) in string format, the number of characters in the user's alphabet, and the number of characters desired in the output. This code assumes that the decimal value of the starting character of the alphabet is 0.