Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Des3ECBDecrypt ¶
Example ¶
package main import ( "encoding/base64" "fmt" "github.com/sechelper/crypto/symmetric" ) func main() { key := []byte("012345678901234567890123") // 24-byte key for 3DES encrypt, _ := base64.StdEncoding.DecodeString("6Dxl7vNNWD4G2sGt6JN1RA==") decrypt, err := symmetric.Des3ECBDecrypt(key, encrypt) if err != nil { panic(err) } fmt.Println(string(decrypt)) }
Output:
func Des3ECBEncrypt ¶
Example ¶
package main import ( "encoding/base64" "fmt" "github.com/sechelper/crypto/symmetric" ) func main() { key := []byte("012345678901234567890123") // 24-byte key for 3DES plaintext := []byte("Hello, Secself!") // Plaintext to encrypt encrypt, err := symmetric.Des3ECBEncrypt(key, plaintext) if err != nil { panic(err) } fmt.Println(base64.StdEncoding.EncodeToString(encrypt)) }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.