You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doTest(CRC64ECMA, "Introduction on CRC calculations", 0xCF8C40119AE90DCB)
85
104
doTest(CRC64ECMA, "Whenever digital data is stored or interfaced, data corruption might occur. Since the beginning of computer science, people have been thinking of ways to deal with this type of problem. For serial data they came up with the solution to attach a parity bit to each sent byte. This simple detection mechanism works if an odd number of bits in a byte changes, but an even number of false bits in one byte will not be detected by the parity check. To overcome this problem people have searched for mathematical sound mechanisms to detect multiple false bits.", 0x31610F76CFB272A5)
105
+
106
+
// More tests for various CRC algorithms (copied from java version)
107
+
longText:="Whenever digital data is stored or interfaced, data corruption might occur. Since the beginning of computer science, people have been thinking of ways to deal with this type of problem. For serial data they came up with the solution to attach a parity bit to each sent byte. This simple detection mechanism works if an odd number of bits in a byte changes, but an even number of false bits in one byte will not be detected by the parity check. To overcome this problem people have searched for mathematical sound mechanisms to detect multiple false bits."
108
+
109
+
testArrayData:=make([]byte, 256)
110
+
fori:=0; i<len(testArrayData); i++ {
111
+
testArrayData[i] =byte(i&0x0FF)
112
+
}
113
+
testArray:=string(testArrayData)
114
+
iflen(testArray) !=256 {
115
+
t.Fatalf("Logic error")
116
+
}
117
+
118
+
// merely a helper to make copying Spock test sets from java version of this library a bit easier
0 commit comments