mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-22 23:09:13 +00:00
Simplify the toBytes helper function a bit
This commit is contained in:
parent
ba9d1f7cb6
commit
1f6bceddb7
1 changed files with 1 additions and 3 deletions
|
@ -118,8 +118,6 @@ public class CryptoUtils {
|
|||
private static byte[] toBytes(char[] chars) {
|
||||
CharBuffer charBuf = CharBuffer.wrap(chars);
|
||||
ByteBuffer byteBuf = Charset.forName("UTF-8").encode(charBuf);
|
||||
byte[] bytes = Arrays.copyOfRange(byteBuf.array(), 0, byteBuf.limit());
|
||||
zero(byteBuf.array());
|
||||
return bytes;
|
||||
return byteBuf.array();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue