Add test.bash
...also adapt the cryptfs tests for 256 bit long keys
This commit is contained in:
parent
2f970e1aa6
commit
440abcbac6
@ -19,7 +19,7 @@ func TestSplitRange(t *testing.T) {
|
|||||||
testRange{65444, 54},
|
testRange{65444, 54},
|
||||||
testRange{6654, 8945})
|
testRange{6654, 8945})
|
||||||
|
|
||||||
key := make([]byte, 16)
|
key := make([]byte, KEY_LEN)
|
||||||
f := NewCryptFS(key, true)
|
f := NewCryptFS(key, true)
|
||||||
|
|
||||||
for _, r := range ranges {
|
for _, r := range ranges {
|
||||||
@ -42,7 +42,7 @@ func TestCiphertextRange(t *testing.T) {
|
|||||||
testRange{65444, 54},
|
testRange{65444, 54},
|
||||||
testRange{6654, 8945})
|
testRange{6654, 8945})
|
||||||
|
|
||||||
key := make([]byte, 16)
|
key := make([]byte, KEY_LEN)
|
||||||
f := NewCryptFS(key, true)
|
f := NewCryptFS(key, true)
|
||||||
|
|
||||||
for _, r := range ranges {
|
for _, r := range ranges {
|
||||||
@ -60,7 +60,7 @@ func TestCiphertextRange(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestBlockNo(t *testing.T) {
|
func TestBlockNo(t *testing.T) {
|
||||||
key := make([]byte, 16)
|
key := make([]byte, KEY_LEN)
|
||||||
f := NewCryptFS(key, true)
|
f := NewCryptFS(key, true)
|
||||||
|
|
||||||
b := f.BlockNoCipherOff(788)
|
b := f.BlockNoCipherOff(788)
|
||||||
|
@ -11,7 +11,7 @@ func TestTranslatePath(t *testing.T) {
|
|||||||
s = append(s, "foo12312312312312312313123123123")
|
s = append(s, "foo12312312312312312313123123123")
|
||||||
s = append(s, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890")
|
s = append(s, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890")
|
||||||
|
|
||||||
key := make([]byte, 16)
|
key := make([]byte, KEY_LEN)
|
||||||
fs := NewCryptFS(key, true)
|
fs := NewCryptFS(key, true)
|
||||||
|
|
||||||
for _, n := range s {
|
for _, n := range s {
|
||||||
@ -33,7 +33,7 @@ func TestPad16(t *testing.T) {
|
|||||||
s = append(s, []byte("12345678901234567"))
|
s = append(s, []byte("12345678901234567"))
|
||||||
s = append(s, []byte("12345678901234567abcdefg"))
|
s = append(s, []byte("12345678901234567abcdefg"))
|
||||||
|
|
||||||
key := make([]byte, 16)
|
key := make([]byte, KEY_LEN)
|
||||||
fs := NewCryptFS(key, true)
|
fs := NewCryptFS(key, true)
|
||||||
|
|
||||||
for i := range s {
|
for i := range s {
|
||||||
|
Loading…
Reference in New Issue
Block a user