port over some more
This commit is contained in:
@@ -222,6 +222,21 @@ defmodule Odinsea.Net.Cipher.LoginCrypto do
|
||||
end
|
||||
end
|
||||
|
||||
@doc """
|
||||
Hashes a second password (PIC) using SHA-1.
|
||||
Used for second password storage.
|
||||
|
||||
## Parameters
|
||||
- password: Plain text second password
|
||||
|
||||
## Returns
|
||||
- Hex-encoded SHA-1 hash (lowercase)
|
||||
"""
|
||||
@spec hash_second_password(String.t()) :: String.t()
|
||||
def hash_second_password(password) when is_binary(password) do
|
||||
hex_sha1(password)
|
||||
end
|
||||
|
||||
# Private helper: hash a string with a given digest algorithm
|
||||
@spec hash_with_digest(String.t(), atom()) :: String.t()
|
||||
defp hash_with_digest(input, digest) do
|
||||
|
||||
@@ -279,6 +279,10 @@ defmodule Odinsea.Net.Opcodes do
|
||||
|
||||
# General
|
||||
def lp_alive_req(), do: 0x0D
|
||||
def lp_enable_action(), do: 0x0C
|
||||
def lp_set_field(), do: 0x14
|
||||
def lp_set_cash_shop_opened(), do: 0x15
|
||||
def lp_migrate_command(), do: 0x16
|
||||
|
||||
# Login
|
||||
def lp_login_status(), do: 0x01
|
||||
|
||||
Reference in New Issue
Block a user