Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/const-oid/README.md # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / const-oid / README.md` 96 lines ยท 3271 bytes Raw Blame History Rendered 1 # [RustCrypto]: Object Identifiers (OIDs) 2 3 [![crate][crate-image]][crate-link] 4 [![Docs][docs-image]][docs-link] 5 [![Build Status][build-image]][build-link] 6 ![Apache2/MIT licensed][license-image] 7 ![Rust Version][rustc-image] 8 [![Project Chat][chat-image]][chat-link] 9 10 Const-friendly implementation of the ISO/IEC Object Identifier (OID) standard 11 as defined in ITU [X.660], with support for BER/DER encoding/decoding as well 12 as heapless `no_std` (i.e. embedded) environments. 13 14 [Documentation][docs-link] 15 16 ## About OIDs 17 18 Object Identifiers, a.k.a. OIDs, are an International Telecommunications 19 Union (ITU) and ISO/IEC standard for naming any object, concept, or "thing" 20 with a globally unambiguous persistent name. 21 22 The ITU's [X.660] standard provides the OID specification. Every OID is part of 23 a hierarchical namespace which begins with a *root OID*, which is either the 24 ITU's root OID (0), the ISO's root OID (1), or the joint ISO/ITU root OID (2). 25 26 The following is an example of an OID, in this case identifying the 27 `rsaEncryption` algorithm: 28 29 ```text 30 1.2.840.113549.1.1.1 31 ``` 32 33 For more information, see: 34 35 ## Implementation 36 37 This library supports parsing OIDs in const contexts, e.g.: 38 39 ```rust 40 use const_oid::ObjectIdentifier; 41 42 pub const MY_OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113549.1.1.1"); 43 ``` 44 45 The OID parser is implemented entirely in terms of `const fn` and without the 46 use of proc macros. 47 48 Additionally, it also includes a `const fn` OID serializer, and stores the OIDs 49 parsed from const contexts encoded using the BER/DER serialization 50 (sans header). 51 52 This allows `ObjectIdentifier` to impl `AsRef<[u8]>` which can be used to 53 obtain the BER/DER serialization of an OID, even one declared `const`. 54 55 Additionally, it impls `FromStr` and `TryFrom<&[u8]>` and functions just as 56 well as a runtime OID library. 57 58 ## Minimum Supported Rust Version 59 60 This crate requires **Rust 1.57** at a minimum. 61 62 We may change the MSRV in the future, but it will be accompanied by a minor 63 version bump. 64 65 ## License 66 67 Licensed under either of: 68 69 * [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) 70 * [MIT license](http://opensource.org/licenses/MIT) 71 72 at your option. 73 74 ### Contribution 75 76 Unless you explicitly state otherwise, any contribution intentionally submitted 77 for inclusion in the work by you, as defined in the Apache-2.0 license, shall be 78 dual licensed as above, without any additional terms or conditions. 79 80 [//]: # (badges) 81 82 [crate-image]: https://buildstats.info/crate/const-oid 83 [crate-link]: https://crates.io/crates/const-oid 84 [docs-image]: https://docs.rs/const-oid/badge.svg 85 [docs-link]: https://docs.rs/const-oid/ 86 [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg 87 [rustc-image]: https://img.shields.io/badge/rustc-1.57+-blue.svg 88 [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg 89 [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/300570-formats 90 [build-image]: https://github.com/RustCrypto/formats/workflows/const-oid/badge.svg?branch=master&event=push 91 [build-link]: https://github.com/RustCrypto/formats/actions 92 93 [//]: # (links) 94 95 [RustCrypto]: https://github.com/rustcrypto 96 [X.660]: https://www.itu.int/rec/T-REC-X.660