mirror of
https://github.com/cubixle/radius-rs.git
synced 2026-07-30 08:53:12 +01:00
Support to generate user-password attribute
This commit is contained in:
+4
-1
@@ -35,10 +35,13 @@ impl Packet {
|
||||
}
|
||||
|
||||
pub fn get_secret(&self) -> &Vec<u8> {
|
||||
// TODO
|
||||
&self.secret
|
||||
}
|
||||
|
||||
pub fn get_authenticator(&self) -> &Vec<u8> {
|
||||
&self.get_authenticator()
|
||||
}
|
||||
|
||||
pub fn parse(bs: &[u8], secret: &[u8]) -> Result<Self, String> {
|
||||
if bs.len() < 20 {
|
||||
return Err("radius packet doesn't have enough length of bytes; that has to be at least 20 bytes".to_owned());
|
||||
|
||||
Reference in New Issue
Block a user