MCPcopy Index your code
hub / github.com/authorizerdev/authorizer / EncryptPassword

Function EncryptPassword

internal/crypto/common.go:64–71  ·  view source on GitHub ↗

EncryptEnvData is used to encrypt the env data TODO: remove this function if not needed func EncryptEnvData(data map[string]interface{}) (string, error) { jsonBytes, err := json.Marshal(data) if err != nil { return "", err } storeData, err := memorystore.Provider.GetEnvStore() if err != nil {

(password string)

Source from the content-addressed store, hash-verified

62
63// EncryptPassword is used for encrypting password
64func EncryptPassword(password string) (string, error) {
65 pw, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)
66 if err != nil {
67 return "", err
68 }
69
70 return string(pw), nil
71}

Callers 15

TestUpdateWebhookTestFunction · 0.92
TestEnableAccessUserFunction · 0.92
TestAdminMetaFunction · 0.92
TestAddWebhookTestFunction · 0.92
TestAdminAuditLogsFunction · 0.92
TestUserFunction · 0.92
setAdminCookieFunction · 0.92
TestEndpointTestFunction · 0.92
TestEmailTemplatesFunction · 0.92
TestUpdateUserFunction · 0.92
TestAdminSessionFunction · 0.92
TestUsersFunction · 0.92

Calls

no outgoing calls

Tested by 15

TestUpdateWebhookTestFunction · 0.74
TestEnableAccessUserFunction · 0.74
TestAdminMetaFunction · 0.74
TestAddWebhookTestFunction · 0.74
TestAdminAuditLogsFunction · 0.74
TestUserFunction · 0.74
setAdminCookieFunction · 0.74
TestEndpointTestFunction · 0.74
TestEmailTemplatesFunction · 0.74
TestUpdateUserFunction · 0.74
TestAdminSessionFunction · 0.74
TestUsersFunction · 0.74