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

Function SASL

cjs/src/connection.js:707–712  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

705 }
706
707 async function SASL() {
708 nonce = (await crypto.randomBytes(18)).toString('base64')
709 b().p().str('SCRAM-SHA-256' + b.N)
710 const i = b.i
711 write(b.inc(4).str('n,,n=*,r=' + nonce).i32(b.i - i - 4, i).end())
712 }
713
714 async function SASLContinue(x) {
715 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