mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-10-31 22:15:59 +01:00
Move toBytes() into SASLMechanism
as it's a often needed transformation in the SASL world.
This commit is contained in:
parent
da7f4495dc
commit
47a59ad7b3
2 changed files with 4 additions and 3 deletions
|
@ -244,4 +244,8 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract SASLMechanism newInstance();
|
protected abstract SASLMechanism newInstance();
|
||||||
|
|
||||||
|
protected static byte[] toBytes(String string) {
|
||||||
|
return StringUtils.toBytes(string);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,4 @@ public class SASLDigestMD5Mechanism extends SASLMechanism {
|
||||||
return responseValue;
|
return responseValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static byte[] toBytes(String string) {
|
|
||||||
return StringUtils.toBytes(string);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue