MCPcopy Index your code
hub / github.com/rclone/rclone / cryptDecode

Function cryptDecode

cmd/cryptdecode/cryptdecode.go:70–85  ·  view source on GitHub ↗

cryptDecode returns the unencrypted file name

(cipher *crypt.Cipher, args []string)

Source from the content-addressed store, hash-verified

68
69// cryptDecode returns the unencrypted file name
70func cryptDecode(cipher *crypt.Cipher, args []string) error {
71 var output strings.Builder
72
73 for _, encryptedFileName := range args {
74 fileName, err := cipher.DecryptFileName(encryptedFileName)
75 if err != nil {
76 output.WriteString(fmt.Sprintln(encryptedFileName, "\t", "Failed to decrypt"))
77 } else {
78 output.WriteString(fmt.Sprintln(encryptedFileName, "\t", fileName))
79 }
80 }
81
82 fmt.Print(output.String())
83
84 return nil
85}
86
87// cryptEncode returns the encrypted file name
88func cryptEncode(cipher *crypt.Cipher, args []string) error {

Callers 1

cryptdecode.goFile · 0.85

Calls 4

WriteStringMethod · 0.65
StringMethod · 0.65
DecryptFileNameMethod · 0.45
PrintMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…