()
| 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), {}) |