-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update IKE #6
Update IKE #6
Conversation
allen0091
commented
Aug 29, 2024
- Add decrypt and encrypt
- Add sha256 algorithm
- Remove XFRM related code
Please resolve the conflicts. |
adc5b90
to
7f20dca
Compare
534cbc7
to
1d57e26
Compare
message/message.go
Outdated
Payloads IKEPayloadContainer | ||
} | ||
|
||
func ParseIkeHeader(b []byte) (*IKEMessage, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return (*IKEHeader, error)
ike.go
Outdated
@@ -29,25 +29,25 @@ func EncodeEncrypt( | |||
// and get IKESA | |||
func DecodeDecrypt( | |||
msg []byte, | |||
ikeMsg *message.IKEMessage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ikeHdr *IKEHeader
ike.go
Outdated
ikeMsg := new(message.IKEMessage) | ||
err := ikeMsg.Decode(msg) | ||
) error { | ||
err := ikeMsg.Decode(msg[message.IKE_HEADER_LEN:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ikeMsg := new(message.IKEMessage)
if ikeHdr == nil {
err := ikeMsg.Decode(msg)
} else {
ikeMsg.IKEHeader = ikeHdr
err := ikeMsg.DecodePayload(msg[msg[message.IKE_HEADER_LEN:])
}