Thank you all for the clarification. At least I now know in this case
octetString is referring to []byte.
I did the conversion to []byte and the radius server accepted the result.
I was just confused when the one handling the radius server asked for "raw
binary" in the response.
Help appreciated!!
On Tue, Mar 14, 2023 at 10:25 AM Van Fury wrote:
> Am developing a server (diameter) which will response with an AVP
> SIP-Authenticate.
> In the specification
>
> " The SIP-Authenticate AVP is of type OctetString and It shall contain,
> binary encoded, the concatenation of the authentication ch
Presumably you are looking at something like
this:
https://www.etsi.org/deliver/etsi_ts/129200_129299/129229/13.01.00_60/ts_129229v130100p.pdf
*6.3.10 SIP-Authenticate AVP*
*The SIP-Authenticate AVP is of type OctetString and contains specific
parts of the data portion of the WWW-Authentic
On Tuesday, 14 March 2023 at 09:26:05 UTC Van Fury wrote:
Am developing a server (diameter) which will response with an AVP
SIP-Authenticate.
In the specification
" The SIP-Authenticate AVP is of type OctetString and It shall contain,
binary encoded, the concatenation of the authentication cha
Am developing a server (diameter) which will response with an AVP
SIP-Authenticate.
In the specification
" The SIP-Authenticate AVP is of type OctetString and It shall contain,
binary encoded, the concatenation of the authentication challenge RAND and
the token AUTN"
The RAND and the AUTN in this
You can also use gob for that.
Here are 2 functions from my library that can help.
import "encoding/gob"
/*
encodeGob encodes a model to gob bytes.
*/
func encodeGob(data any) ([]byte, error) {
var (
buf bytes.Buffer
enc = gob.NewEncoder(&buf) // Will write to network.
)
err := enc.Encode(data)
Am arbitrary byte can be encoded in 2 HEX characters - only a 2x increase in
size not 8x.
> On Mar 13, 2023, at 2:35 PM, Volker Dobler wrote:
>
> On Monday, 13 March 2023 at 17:41:42 UTC+1 Van Fury wrote:
> Relating to my previous question, I have been reading but it is still not
> clear to me
On Monday, 13 March 2023 at 17:41:42 UTC+1 Van Fury wrote:
Relating to my previous question, I have been reading but it is still not
clear to me what raw binary is, how is it different from
text formatted binary (fmt.Sprintf("%b", s1s2Byte))?
"text formated binary" takes a stream of bytes and f
I wonder if what is needed here is just null-terminated strings.
-Bruno
On Mon, Mar 13, 2023 at 1:28 PM Kurtis Rader wrote:
> On Mon, Mar 13, 2023 at 9:41 AM Van Fury wrote:
>
>> Relating to my previous question, I have been reading but it is still not
>> clear to me what raw binary is, how i
On Mon, Mar 13, 2023 at 9:41 AM Van Fury wrote:
> Relating to my previous question, I have been reading but it is still not
> clear to me what raw binary is, how is it different from
> text formatted binary (fmt.Sprintf("%b", s1s2Byte))?
> In my problem above I need to encode s1+s2 to raw binary
Relating to my previous question, I have been reading but it is still not
clear to me what raw binary is, how is it different from
text formatted binary (fmt.Sprintf("%b", s1s2Byte))?
In my problem above I need to encode s1+s2 to raw binary before sending the
result to the server
which then decodes
Do you mean encoding should be
rawdata := fmt.Print("%016d%s%s", len(s1), s1,s2)
or
rawdata := fmt.Printf("%016d%s%s", len(s1), s1,s2)
On Monday, March 13, 2023 at 4:36:50 PM UTC+2 Alex Howarth wrote:
> You might be looking for strconv.ParseUint()
> https://pkg.go.dev/strconv#ParseUint
>
> h
You might be looking for strconv.ParseUint()
https://pkg.go.dev/strconv#ParseUint
https://go.dev/play/p/qAO9LfLD41D
On Mon, 13 Mar 2023 at 07:24, Van Fury wrote:
>
> Sorry I did not frame my question properly but what I would like to do is
> to
> encode concatenated s1 and s2 into raw binary an
On Monday, 13 March 2023 at 12:24:15 UTC+1 Van Fury wrote:
Sorry I did not frame my question properly but what I would like to do is to
encode concatenated s1 and s2 into raw binary and then decode the raw binary
back to s1 and s2.
The only problem is knowing where s1 ends / where s2 starts.
So
Sorry I did not frame my question properly but what I would like to do is to
encode concatenated s1 and s2 into raw binary and then decode the raw binary
back to s1 and s2.
On Friday, March 10, 2023 at 11:36:09 PM UTC+2 Alex Howarth wrote:
> If s1 and s2 are a fixed length then you can just sl
If s1 and s2 are a fixed length then you can just slice up the decoded
string based on the lengths. If they are of a variable length, you'll need
a separator in the input string to later split on when decoded (s3 := s1 +
":" + s2 etc)?
On Fri, 10 Mar 2023 at 10:33, Van Fury wrote:
> Hi,
>
> I ha
Perhaps I have misunderstood your question but
doesn't hex.EncodeToString(s1s2Byte) do what you want?
On Fri, Mar 10, 2023 at 7:33 AM Van Fury wrote:
> Hi,
>
> I have two hexadecimal string values and would like to concatenate the two
> strings and
>
>1. encode the result to binary
>2. d
17 matches
Mail list logo