MCPcopy
hub / github.com/rclone/rclone / TestNonStandardEncryptDirName

Function TestNonStandardEncryptDirName

backend/crypt/cipher_test.go:576–586  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

574}
575
576func 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
588func testStandardDecryptDirName(t *testing.T, encoding string, testCases []EncodingTestCase, caseInsensitive bool) {
589 enc, _ := NewNameEncoding(encoding)

Callers

nothing calls this directly

Calls 4

NewNameEncodingFunction · 0.85
newCipherFunction · 0.85
EncryptDirNameMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…