added method for coverting byte[] to secret data and vice versa