(t *testing.T)
| 574 | } |
| 575 | |
| 576 | func TestNonStandardEncryptDirName(t *testing.T) { |
| 577 | for _, encoding := range []string{"base32", "base64", "base32768"} { |
| 578 | enc, _ := NewNameEncoding(encoding) |
| 579 | c, _ := newCipher(NameEncryptionStandard, "", "", false, enc) |
| 580 | assert.Equal(t, "1/12", c.EncryptDirName("1/12")) |
| 581 | assert.Equal(t, "1/12/123", c.EncryptDirName("1/12/123")) |
| 582 | // Now off mode |
| 583 | c, _ = newCipher(NameEncryptionOff, "", "", true, enc) |
| 584 | assert.Equal(t, "1/12/123", c.EncryptDirName("1/12/123")) |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | func testStandardDecryptDirName(t *testing.T, encoding string, testCases []EncodingTestCase, caseInsensitive bool) { |
| 589 | enc, _ := NewNameEncoding(encoding) |
nothing calls this directly
no test coverage detected
searching dependent graphs…