Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
Decrypt decrypts the given encrypted data using the specified secret key.
Parameters: - data: Encrypted data to be decrypted. - secretKey: Secret key used for decryption.
Returns: - decoded: Decrypted data. - err: Error, if any, encountered during the decryption process.
Example Usage: decryptedData, err := Decrypt(encryptedData, "yourSecretKey")
if err != nil { fmt.Println("Decryption failed:", err) return }
fmt.Println("Decryption successful. Decrypted Data:", decryptedData)
func Encrypt ¶
Encrypt encrypts the given data using the specified secret key.
Parameters: - data: Data to be encrypted. - secretKey: Secret key used for encryption.
Returns: - encoded: Encrypted data. - err: Error, if any, encountered during the encryption process.
Example Usage: encryptedData, err := Encrypt(originalData, "yourSecretKey")
if err != nil { fmt.Println("Encryption failed:", err) return }
fmt.Println("Encryption successful. Encrypted Data:", encryptedData)
Types ¶
This section is empty.