libbson: abstract oid validation in bson_oid_is_valid().
This is for validating 24-character strings. All 12-character strings are valid since they are simply bytes. This function does not validate that. When creating your bson_oid_t, simply use the proper init function based on your use. bson_oid_init_from_string(&oid, ...) // 24-byte string bson_oid_init_from_data(&oid, ...) // 12-byte buffer
parent
5dd7b853
Please register or sign in to comment