You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
765 B
20 lines
765 B
package crypto
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestCrypto_DesEncrypt(t *testing.T) {
|
|
fmt.Println(cryptoTool.DesEncrypt("xZwKptMh5VdCv_6gAnoO9b4YgwE8J6dy"))
|
|
//42002eb4f920ed0f228c833c3d54ab3d7c7e1dd8999306ede9e2cfd9c5d5b7356c2951efbc920e68 <nil>
|
|
fmt.Println(cryptoTool.DesEncrypt("xZwKptMh5VdCv_6gAnoO9b4YgwE8J6dy", "12345678"))
|
|
//276b7af582c1aa7b99ef89bf9aac3b62dee2179b2e58208af0225d6094cd99d93d7595a98bff809d <nil>
|
|
|
|
fmt.Println(cryptoTool.DesDecrypt("42002eb4f920ed0f228c833c3d54ab3d7c7e1dd8999306ede9e2cfd9c5d5b7356c2951efbc920e68"))
|
|
//xZwKptMh5VdCv_6gAnoO9b4YgwE8J6dy <nil>
|
|
fmt.Println(cryptoTool.DesDecrypt("276b7af582c1aa7b99ef89bf9aac3b62dee2179b2e58208af0225d6094cd99d93d7595a98bff809d", "12345678"))
|
|
//xZwKptMh5VdCv_6gAnoO9b4YgwE8J6dy <nil>
|
|
|
|
}
|