MCPcopy Create free account
hub / github.com/porsager/postgres / SASL

Function SASL

deno/src/connection.js:710–715  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

708 }
709
710 async function SASL() {
711 nonce = (await crypto.randomBytes(18)).toString('base64')
712 b().p().str('SCRAM-SHA-256' + b.N)
713 const i = b.i
714 write(b.inc(4).str('n,,n=*,r=' + nonce).i32(b.i - i - 4, i).end())
715 }
716
717 async function SASLContinue(x) {
718 const res = x.toString('utf8', 9).split(',').reduce((acc, x) => (acc[x[0]] = x.slice(2), acc), {})

Callers

nothing calls this directly

Calls 2

writeFunction · 0.70
endMethod · 0.65

Tested by

no test coverage detected