diff options
Diffstat (limited to 'lib/asn1kit/types/null.rb')
-rw-r--r-- | lib/asn1kit/types/null.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/asn1kit/types/null.rb b/lib/asn1kit/types/null.rb new file mode 100644 index 0000000..db37744 --- /dev/null +++ b/lib/asn1kit/types/null.rb @@ -0,0 +1,18 @@ +# coding: ASCII-8BIT + +class ASN1Kit::Null < ASN1Kit::Type + asn1_tag :IMPLICIT, :UNIVERSAL, 5 + asn1_alias "NULL" + + def der_encoded_value + [:primitive, String.new] + end + + def to_der + der_header(0) + end + + def ==(other) + other.is_a?(ASN1Kit::Null) + end +end |