public byte[] EncryptBuffer(BufferStream buffer) { if (isCryptEnabled) { return(crypto.EncryptBuffer(buffer.Memory)); } return(buffer.Memory); }