You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What do ya'll think about adding a CustomHash class which streamlines the creation of non-default hash types.
It could possibly derive from cybox.common.Hash but set the type_ field to an instance of cybox.common.String rather than cybox.common.VocabString (I'm not positive that'd work as planned).
It's not difficult to override the xsi:type, but it requires some in depth knoweldge of the data model and XML:
h=Hash("deadbeef", 'FOOHASH')
h.type_.xsi_type=None# this is a bit trickyprinth.to_xml()
What about just adding a add_custom_hash() function to the HashList (and maybe types that use it, such as File)? I don't like adding more classes that aren't actual CybOX types (things like EmailAddress continually cause trouble).
What do ya'll think about adding a
CustomHash
class which streamlines the creation of non-default hash types.It could possibly derive from
cybox.common.Hash
but set thetype_
field to an instance ofcybox.common.String
rather thancybox.common.VocabString
(I'm not positive that'd work as planned).It's not difficult to override the
xsi:type
, but it requires some in depth knoweldge of the data model and XML:This yields:
The text was updated successfully, but these errors were encountered: