-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the vendorspecificatrribues problem #21
Comments
Hello, the library doesn't currently have a good way to compact vendor-specific attributes into a single top-level attribute. For now, you could use ByteBuffer byteBuffer = ByteBuffer.allocate(253);
byteBuffer.putInt(311); // Microsoft (26.311)
byteBuffer.put((byte) 7); // MPPE-Encryption-Policy (26.311.7)
byteBuffer.put((byte) (2 + 4)); // 2 + size of the value below (integer)
byteBuffer.putInt(1);
byteBuffer.put((byte) 21); // ARAP-PW-Change-Reason (26.311.21)
byteBuffer.put((byte) (2 + 4)); // 2 + size of the value below (integer)
byteBuffer.putInt(4);
byte[] rawAttributeData = new byte[byteBuffer.position()];
System.arraycopy(byteBuffer.array(), 0, rawAttributeData, 0, byteBuffer.position());
new RawAttribute(26, rawAttributeData); A future version of the library will have a cleaner way of doing this using the built-in attribute dictionary support. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, can you solve the search and insertion of multiple private vendor attributes with the following data structure
[typeid,vendorid] //typeid = 26, or24x.26
[vendortype,length,value]
[vendortype,length,value]
[vendortype,length,value]
[vendortype,length,value]
[vendortype,length,value]
I spent a long time solving the parsing problem, but I couldn't solve the insertion problem of the above structure. If I try to solve it forcefully, it will turn the code into a pile of crap
thinks
The text was updated successfully, but these errors were encountered: