# Copyright (c) 2024 Yuki Kimoto
# MIT License

class Net::SSLeay::ASN1_STRING : pointer {
  version_from Net::SSLeay;
  
  use Fn;
  
  # Class Methods
  native static method new : Net::SSLeay::ASN1_STRING ();
  
  private static method new_with_pointer : Net::SSLeay::ASN1_STRING ($pointer : Address, $options : object[] = undef) {
    
    my $self = new Net::SSLeay::ASN1_STRING;
    
    Fn->set_pointer($self, $pointer);
    
    return $self;
  }
  
  # Instance Methods
  native method length : int ();
  
  native method get0_data : string ();
  
  native method set : void ($data : string, $len : int = -1);
  
  native method DESTROY : void ();
  
}