本文简要介绍ruby语言中 OpenSSL::ASN1::Primitive.new 的用法。
用法
OpenSSL::ASN1::Primitive.new(value [, tag, tagging, tag_class ]) → Primitive
value :是强制性的。
tag :可选,可以为标记值指定。如果没有指定tag,则默认使用 Primitive sub-class对应的UNIVERSAL标签。
tagging :可用作编码提示以显式或隐式编码值,请参阅 ASN1 了解可能的值。
tag_class :如果 tag 和 tagging 是 nil 则默认设置为 :UNIVERSAL。如果设置了tag 或tagging,则默认使用:CONTEXT_SPECIFIC。对于可能的值,请参阅。 ASN1 。
示例
int = OpenSSL::ASN1::Integer.new(42)
zero_tagged_int = OpenSSL::ASN1::Integer.new(42, 0, :IMPLICIT)
private_explicit_zero_tagged_int = OpenSSL::ASN1::Integer.new(42, 0, :EXPLICIT, :PRIVATE)
相关用法
- Ruby Primitive.new用法及代码示例
- Ruby Primitive类用法及代码示例
- Ruby PrettyPrint.current_group用法及代码示例
- Ruby Process.groups用法及代码示例
- Ruby Process.wait2用法及代码示例
- Ruby Process.getpgrp用法及代码示例
- Ruby Proc.eql?用法及代码示例
- Ruby PrettyPrint.genspace用法及代码示例
- Ruby Profiler模块用法及代码示例
- Ruby Process.setproctitle用法及代码示例
- Ruby Process.setrlimit用法及代码示例
- Ruby Proc.prc ==用法及代码示例
- Ruby Profiler.raw_data用法及代码示例
- Ruby Process.uid用法及代码示例
- Ruby Process.pid用法及代码示例
- Ruby Proc.ruby2_keywords用法及代码示例
- Ruby Proc.new用法及代码示例
- Ruby Process.detach用法及代码示例
- Ruby Process.maxgroups用法及代码示例
- Ruby Process.clock_gettime用法及代码示例
- Ruby Proc.lambda?用法及代码示例
- Ruby Proc.arity用法及代码示例
- Ruby Process.exec用法及代码示例
- Ruby Process.groups=用法及代码示例
- Ruby Proc.(params,...)用法及代码示例
注:本文由纯净天空筛选整理自ruby-lang.org大神的英文原创作品 Primitive.new。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
