public static function bitStringToOctetString(BitString $bs): OctetString
    {
        $str = $bs->string();
        if ($bs->unusedBits()) {
            // @todo pad string
            throw new \RuntimeException("Unaligned bitstrings to supported");
        }
        return new OctetString($str);
    }