"use strict";(self.webpackChunkgoffee_site=self.webpackChunkgoffee_site||[]).push([[7292],{9722:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>f,frontMatter:()=>r,metadata:()=>i,toc:()=>d});var t=s(4848),o=s(8453);const r={title:"Hashing passowrds"},c=void 0,i={id:"hashing",title:"Hashing passowrds",description:"Hashing passowrds in Goffee can be done by using the object hashing from the context, here is how you can do that:",source:"@site/docs/hashing.md",sourceDirName:".",slug:"/hashing",permalink:"/goffee/docs/hashing",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Hashing passowrds"},sidebar:"docsSidebar",previous:{title:"TLS",permalink:"/goffee/docs/tls"},next:{title:"Sending Emails",permalink:"/goffee/docs/emails"}},a={},d=[];function h(e){const n={code:"code",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["Hashing passowrds in ",(0,t.jsx)(n.code,{children:"Goffee"})," can be done by using the object ",(0,t.jsx)(n.code,{children:"hashing"})," from the context, here is how you can do that:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-go",children:'package controllers\n\nimport (\n    "it.smarteching.com/goffee/core"\n)\n\nfunc Login(c *core.Context) *core.Response {\n    hashedPassword, err := c.GetHashing().HashPassword("my-password")\n}\n'})})]})}function f(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>i});var t=s(6540);const o={},r=t.createContext(o);function c(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);