Function
encodeSASLInitialResponse
(options: Omit<SASLInitialResponse, "_tag">)
Source from the content-addressed store, hash-verified
| 1074 | * @since 4.0.0 |
| 1075 | */ |
| 1076 | export const encodeSASLInitialResponse = (options: Omit<SASLInitialResponse, "_tag">): Uint8Array => { |
| 1077 | const writer = begin(0x70) |
| 1078 | writer.cString(options.mechanism) |
| 1079 | if (options.initialResponse === null) { |
| 1080 | writer.int32(-1) |
| 1081 | } else { |
| 1082 | writer.int32(options.initialResponse.length) |
| 1083 | writer.raw(options.initialResponse) |
| 1084 | } |
| 1085 | return end() |
| 1086 | } |
| 1087 | |
| 1088 | /** |
| 1089 | * Encodes a `SASLResponse` message. |
Tested by
no test coverage detected