MCPcopy
hub / github.com/SpecterOps/BloodHound / defaultDigestAuthSecret

Function defaultDigestAuthSecret

cmd/api/src/api/v2/auth/auth_test.go:3831–3850  ·  view source on GitHub ↗
(t *testing.T, value string)

Source from the content-addressed store, hash-verified

3829}
3830
3831func defaultDigestAuthSecret(t *testing.T, value string) *model.AuthSecret {
3832 var (
3833 digester = config.Argon2Configuration{
3834 MemoryKibibytes: 1024 * 1024,
3835 NumIterations: 1,
3836 NumThreads: 1,
3837 }.NewDigester()
3838
3839 digest, err = digester.Digest(value)
3840 )
3841
3842 if err != nil {
3843 t.Fatal(err)
3844 }
3845
3846 return &model.AuthSecret{
3847 DigestMethod: digester.Method(),
3848 Digest: digest.String(),
3849 }
3850}
3851
3852func TestManagementResource_CreateAuthToken(t *testing.T) {
3853 t.Parallel()

Calls 4

NewDigesterMethod · 0.80
DigestMethod · 0.65
MethodMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected