apc-p15-tool/pkg/tools/asn1obj/integer.go
2024-01-25 20:16:37 -05:00

17 lines
286 B
Go

package asn1obj
import (
"encoding/asn1"
"math/big"
)
// Integer returns an ASN.1 OBJECT IDENTIFIER with the oidValue bytes
func Integer(bigInt *big.Int) []byte {
// should never error
asn1result, err := asn1.Marshal(bigInt)
if err != nil {
panic(err)
}
return asn1result
}