// Copyright 2019 autocareai.com. All rights reserved. // Use of this source code is governed by autocareai.com. package util import ( "encoding/base64" "google.golang.org/grpc/status" ) func GetMd5Pass(passwd,cryptoKey string) (string, error) { cryPasswd, err := AesEncrypt(passwd, cryptoKey) if err != nil { return "", status.Error(10003, "参数错误") } ret := MD5(base64.StdEncoding.EncodeToString(cryPasswd)) return ret, nil }