mirror of
https://github.com/mii443/lamport_sigs.rs.git
synced 2025-08-22 23:15:26 +00:00
Remove documentation from master branch. See gh-pages branch instead.
This commit is contained in:
@ -1,64 +0,0 @@
|
|||||||
These documentation pages include resources by third parties. This copyright
|
|
||||||
file applies only to those resources. The following third party resources are
|
|
||||||
included, and carry their own copyright notices and license terms:
|
|
||||||
|
|
||||||
* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff):
|
|
||||||
|
|
||||||
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
|
|
||||||
with Reserved Font Name Fira Sans.
|
|
||||||
|
|
||||||
Copyright (c) 2014, Telefonica S.A.
|
|
||||||
|
|
||||||
Licensed under the SIL Open Font License, Version 1.1.
|
|
||||||
See FiraSans-LICENSE.txt.
|
|
||||||
|
|
||||||
* Heuristica (Heuristica-Italic.woff):
|
|
||||||
|
|
||||||
Copyright 1989, 1991 Adobe Systems Incorporated. All rights reserved.
|
|
||||||
Utopia is either a registered trademark or trademark of Adobe Systems
|
|
||||||
Incorporated in the United States and/or other countries. Used under
|
|
||||||
license.
|
|
||||||
|
|
||||||
Copyright 2006 Han The Thanh, Vntopia font family, http://vntex.sf.net
|
|
||||||
|
|
||||||
Copyright (c) 2008-2012, Andrey V. Panov (panov@canopus.iacp.dvo.ru),
|
|
||||||
with Reserved Font Name Heuristica.
|
|
||||||
|
|
||||||
Licensed under the SIL Open Font License, Version 1.1.
|
|
||||||
See Heuristica-LICENSE.txt.
|
|
||||||
|
|
||||||
* jQuery (jquery-2.1.4.min.js):
|
|
||||||
|
|
||||||
Copyright 2005, 2015 jQuery Foundation, Inc.
|
|
||||||
Licensed under the MIT license (see LICENSE-MIT.txt).
|
|
||||||
|
|
||||||
* rustdoc.css, main.js, and playpen.js:
|
|
||||||
|
|
||||||
Copyright 2015 The Rust Developers.
|
|
||||||
Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or
|
|
||||||
the MIT license (LICENSE-MIT.txt) at your option.
|
|
||||||
|
|
||||||
* normalize.css:
|
|
||||||
|
|
||||||
Copyright (c) Nicolas Gallagher and Jonathan Neal.
|
|
||||||
Licensed under the MIT license (see LICENSE-MIT.txt).
|
|
||||||
|
|
||||||
* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff):
|
|
||||||
|
|
||||||
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
|
|
||||||
with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark
|
|
||||||
of Adobe Systems Incorporated in the United States and/or other countries.
|
|
||||||
|
|
||||||
Licensed under the SIL Open Font License, Version 1.1.
|
|
||||||
See SourceCodePro-LICENSE.txt.
|
|
||||||
|
|
||||||
* Source Serif Pro (SourceSerifPro-Regular.woff, SourceSerifPro-Bold.woff):
|
|
||||||
|
|
||||||
Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with
|
|
||||||
Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of
|
|
||||||
Adobe Systems Incorporated in the United States and/or other countries.
|
|
||||||
|
|
||||||
Licensed under the SIL Open Font License, Version 1.1.
|
|
||||||
See SourceSerifPro-LICENSE.txt.
|
|
||||||
|
|
||||||
This copyright file is intended to be distributed with rustdoc output.
|
|
@ -1,99 +0,0 @@
|
|||||||
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
|
|
||||||
with Reserved Font Name Fira Sans.
|
|
||||||
|
|
||||||
Copyright (c) 2014, Mozilla Foundation https://mozilla.org/
|
|
||||||
with Reserved Font Name Fira Mono.
|
|
||||||
|
|
||||||
Copyright (c) 2014, Telefonica S.A.
|
|
||||||
|
|
||||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
||||||
This license is copied below, and is also available with a FAQ at:
|
|
||||||
http://scripts.sil.org/OFL
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------
|
|
||||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
PREAMBLE
|
|
||||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
||||||
development of collaborative font projects, to support the font creation
|
|
||||||
efforts of academic and linguistic communities, and to provide a free and
|
|
||||||
open framework in which fonts may be shared and improved in partnership
|
|
||||||
with others.
|
|
||||||
|
|
||||||
The OFL allows the licensed fonts to be used, studied, modified and
|
|
||||||
redistributed freely as long as they are not sold by themselves. The
|
|
||||||
fonts, including any derivative works, can be bundled, embedded,
|
|
||||||
redistributed and/or sold with any software provided that any reserved
|
|
||||||
names are not used by derivative works. The fonts and derivatives,
|
|
||||||
however, cannot be released under any other type of license. The
|
|
||||||
requirement for fonts to remain under this license does not apply
|
|
||||||
to any document created using the fonts or their derivatives.
|
|
||||||
|
|
||||||
DEFINITIONS
|
|
||||||
"Font Software" refers to the set of files released by the Copyright
|
|
||||||
Holder(s) under this license and clearly marked as such. This may
|
|
||||||
include source files, build scripts and documentation.
|
|
||||||
|
|
||||||
"Reserved Font Name" refers to any names specified as such after the
|
|
||||||
copyright statement(s).
|
|
||||||
|
|
||||||
"Original Version" refers to the collection of Font Software components as
|
|
||||||
distributed by the Copyright Holder(s).
|
|
||||||
|
|
||||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
||||||
or substituting -- in part or in whole -- any of the components of the
|
|
||||||
Original Version, by changing formats or by porting the Font Software to a
|
|
||||||
new environment.
|
|
||||||
|
|
||||||
"Author" refers to any designer, engineer, programmer, technical
|
|
||||||
writer or other person who contributed to the Font Software.
|
|
||||||
|
|
||||||
PERMISSION & CONDITIONS
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
||||||
redistribute, and sell modified and unmodified copies of the Font
|
|
||||||
Software, subject to the following conditions:
|
|
||||||
|
|
||||||
1) Neither the Font Software nor any of its individual components,
|
|
||||||
in Original or Modified Versions, may be sold by itself.
|
|
||||||
|
|
||||||
2) Original or Modified Versions of the Font Software may be bundled,
|
|
||||||
redistributed and/or sold with any software, provided that each copy
|
|
||||||
contains the above copyright notice and this license. These can be
|
|
||||||
included either as stand-alone text files, human-readable headers or
|
|
||||||
in the appropriate machine-readable metadata fields within text or
|
|
||||||
binary files as long as those fields can be easily viewed by the user.
|
|
||||||
|
|
||||||
3) No Modified Version of the Font Software may use the Reserved Font
|
|
||||||
Name(s) unless explicit written permission is granted by the corresponding
|
|
||||||
Copyright Holder. This restriction only applies to the primary font name as
|
|
||||||
presented to the users.
|
|
||||||
|
|
||||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
||||||
Software shall not be used to promote, endorse or advertise any
|
|
||||||
Modified Version, except to acknowledge the contribution(s) of the
|
|
||||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
||||||
permission.
|
|
||||||
|
|
||||||
5) The Font Software, modified or unmodified, in part or in whole,
|
|
||||||
must be distributed entirely under this license, and must not be
|
|
||||||
distributed under any other license. The requirement for fonts to
|
|
||||||
remain under this license does not apply to any document created
|
|
||||||
using the Font Software.
|
|
||||||
|
|
||||||
TERMINATION
|
|
||||||
This license becomes null and void if any of the above conditions are
|
|
||||||
not met.
|
|
||||||
|
|
||||||
DISCLAIMER
|
|
||||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
||||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
||||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
||||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
||||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,101 +0,0 @@
|
|||||||
Copyright 1989, 1991 Adobe Systems Incorporated. All rights reserved.
|
|
||||||
Utopia is either a registered trademark or trademark of Adobe Systems
|
|
||||||
Incorporated in the United States and/or other countries. Used under
|
|
||||||
license.
|
|
||||||
|
|
||||||
Copyright 2006 Han The Thanh, Vntopia font family, http://vntex.sf.net
|
|
||||||
|
|
||||||
Copyright (c) 2008-2012, Andrey V. Panov (panov@canopus.iacp.dvo.ru),
|
|
||||||
with Reserved Font Name Heuristica.
|
|
||||||
|
|
||||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
||||||
This license is copied below, and is also available with a FAQ at:
|
|
||||||
http://scripts.sil.org/OFL
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------
|
|
||||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
PREAMBLE
|
|
||||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
||||||
development of collaborative font projects, to support the font creation
|
|
||||||
efforts of academic and linguistic communities, and to provide a free and
|
|
||||||
open framework in which fonts may be shared and improved in partnership
|
|
||||||
with others.
|
|
||||||
|
|
||||||
The OFL allows the licensed fonts to be used, studied, modified and
|
|
||||||
redistributed freely as long as they are not sold by themselves. The
|
|
||||||
fonts, including any derivative works, can be bundled, embedded,
|
|
||||||
redistributed and/or sold with any software provided that any reserved
|
|
||||||
names are not used by derivative works. The fonts and derivatives,
|
|
||||||
however, cannot be released under any other type of license. The
|
|
||||||
requirement for fonts to remain under this license does not apply
|
|
||||||
to any document created using the fonts or their derivatives.
|
|
||||||
|
|
||||||
DEFINITIONS
|
|
||||||
"Font Software" refers to the set of files released by the Copyright
|
|
||||||
Holder(s) under this license and clearly marked as such. This may
|
|
||||||
include source files, build scripts and documentation.
|
|
||||||
|
|
||||||
"Reserved Font Name" refers to any names specified as such after the
|
|
||||||
copyright statement(s).
|
|
||||||
|
|
||||||
"Original Version" refers to the collection of Font Software components as
|
|
||||||
distributed by the Copyright Holder(s).
|
|
||||||
|
|
||||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
||||||
or substituting -- in part or in whole -- any of the components of the
|
|
||||||
Original Version, by changing formats or by porting the Font Software to a
|
|
||||||
new environment.
|
|
||||||
|
|
||||||
"Author" refers to any designer, engineer, programmer, technical
|
|
||||||
writer or other person who contributed to the Font Software.
|
|
||||||
|
|
||||||
PERMISSION & CONDITIONS
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
||||||
redistribute, and sell modified and unmodified copies of the Font
|
|
||||||
Software, subject to the following conditions:
|
|
||||||
|
|
||||||
1) Neither the Font Software nor any of its individual components,
|
|
||||||
in Original or Modified Versions, may be sold by itself.
|
|
||||||
|
|
||||||
2) Original or Modified Versions of the Font Software may be bundled,
|
|
||||||
redistributed and/or sold with any software, provided that each copy
|
|
||||||
contains the above copyright notice and this license. These can be
|
|
||||||
included either as stand-alone text files, human-readable headers or
|
|
||||||
in the appropriate machine-readable metadata fields within text or
|
|
||||||
binary files as long as those fields can be easily viewed by the user.
|
|
||||||
|
|
||||||
3) No Modified Version of the Font Software may use the Reserved Font
|
|
||||||
Name(s) unless explicit written permission is granted by the corresponding
|
|
||||||
Copyright Holder. This restriction only applies to the primary font name as
|
|
||||||
presented to the users.
|
|
||||||
|
|
||||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
||||||
Software shall not be used to promote, endorse or advertise any
|
|
||||||
Modified Version, except to acknowledge the contribution(s) of the
|
|
||||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
||||||
permission.
|
|
||||||
|
|
||||||
5) The Font Software, modified or unmodified, in part or in whole,
|
|
||||||
must be distributed entirely under this license, and must not be
|
|
||||||
distributed under any other license. The requirement for fonts to
|
|
||||||
remain under this license does not apply to any document created
|
|
||||||
using the Font Software.
|
|
||||||
|
|
||||||
TERMINATION
|
|
||||||
This license becomes null and void if any of the above conditions are
|
|
||||||
not met.
|
|
||||||
|
|
||||||
DISCLAIMER
|
|
||||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
||||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
||||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
||||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
||||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
@ -1,23 +0,0 @@
|
|||||||
Permission is hereby granted, free of charge, to any
|
|
||||||
person obtaining a copy of this software and associated
|
|
||||||
documentation files (the "Software"), to deal in the
|
|
||||||
Software without restriction, including without
|
|
||||||
limitation the rights to use, copy, modify, merge,
|
|
||||||
publish, distribute, sublicense, and/or sell copies of
|
|
||||||
the Software, and to permit persons to whom the Software
|
|
||||||
is furnished to do so, subject to the following
|
|
||||||
conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice
|
|
||||||
shall be included in all copies or substantial portions
|
|
||||||
of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
||||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
||||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
||||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
||||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
DEALINGS IN THE SOFTWARE.
|
|
@ -1,93 +0,0 @@
|
|||||||
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
|
||||||
|
|
||||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
||||||
|
|
||||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------
|
|
||||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
PREAMBLE
|
|
||||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
||||||
development of collaborative font projects, to support the font creation
|
|
||||||
efforts of academic and linguistic communities, and to provide a free and
|
|
||||||
open framework in which fonts may be shared and improved in partnership
|
|
||||||
with others.
|
|
||||||
|
|
||||||
The OFL allows the licensed fonts to be used, studied, modified and
|
|
||||||
redistributed freely as long as they are not sold by themselves. The
|
|
||||||
fonts, including any derivative works, can be bundled, embedded,
|
|
||||||
redistributed and/or sold with any software provided that any reserved
|
|
||||||
names are not used by derivative works. The fonts and derivatives,
|
|
||||||
however, cannot be released under any other type of license. The
|
|
||||||
requirement for fonts to remain under this license does not apply
|
|
||||||
to any document created using the fonts or their derivatives.
|
|
||||||
|
|
||||||
DEFINITIONS
|
|
||||||
"Font Software" refers to the set of files released by the Copyright
|
|
||||||
Holder(s) under this license and clearly marked as such. This may
|
|
||||||
include source files, build scripts and documentation.
|
|
||||||
|
|
||||||
"Reserved Font Name" refers to any names specified as such after the
|
|
||||||
copyright statement(s).
|
|
||||||
|
|
||||||
"Original Version" refers to the collection of Font Software components as
|
|
||||||
distributed by the Copyright Holder(s).
|
|
||||||
|
|
||||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
||||||
or substituting -- in part or in whole -- any of the components of the
|
|
||||||
Original Version, by changing formats or by porting the Font Software to a
|
|
||||||
new environment.
|
|
||||||
|
|
||||||
"Author" refers to any designer, engineer, programmer, technical
|
|
||||||
writer or other person who contributed to the Font Software.
|
|
||||||
|
|
||||||
PERMISSION & CONDITIONS
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
||||||
redistribute, and sell modified and unmodified copies of the Font
|
|
||||||
Software, subject to the following conditions:
|
|
||||||
|
|
||||||
1) Neither the Font Software nor any of its individual components,
|
|
||||||
in Original or Modified Versions, may be sold by itself.
|
|
||||||
|
|
||||||
2) Original or Modified Versions of the Font Software may be bundled,
|
|
||||||
redistributed and/or sold with any software, provided that each copy
|
|
||||||
contains the above copyright notice and this license. These can be
|
|
||||||
included either as stand-alone text files, human-readable headers or
|
|
||||||
in the appropriate machine-readable metadata fields within text or
|
|
||||||
binary files as long as those fields can be easily viewed by the user.
|
|
||||||
|
|
||||||
3) No Modified Version of the Font Software may use the Reserved Font
|
|
||||||
Name(s) unless explicit written permission is granted by the corresponding
|
|
||||||
Copyright Holder. This restriction only applies to the primary font name as
|
|
||||||
presented to the users.
|
|
||||||
|
|
||||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
||||||
Software shall not be used to promote, endorse or advertise any
|
|
||||||
Modified Version, except to acknowledge the contribution(s) of the
|
|
||||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
||||||
permission.
|
|
||||||
|
|
||||||
5) The Font Software, modified or unmodified, in part or in whole,
|
|
||||||
must be distributed entirely under this license, and must not be
|
|
||||||
distributed under any other license. The requirement for fonts to
|
|
||||||
remain under this license does not apply to any document created
|
|
||||||
using the Font Software.
|
|
||||||
|
|
||||||
TERMINATION
|
|
||||||
This license becomes null and void if any of the above conditions are
|
|
||||||
not met.
|
|
||||||
|
|
||||||
DISCLAIMER
|
|
||||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
||||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
||||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
||||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
||||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,93 +0,0 @@
|
|||||||
Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
|
||||||
|
|
||||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
||||||
|
|
||||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------
|
|
||||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
PREAMBLE
|
|
||||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
||||||
development of collaborative font projects, to support the font creation
|
|
||||||
efforts of academic and linguistic communities, and to provide a free and
|
|
||||||
open framework in which fonts may be shared and improved in partnership
|
|
||||||
with others.
|
|
||||||
|
|
||||||
The OFL allows the licensed fonts to be used, studied, modified and
|
|
||||||
redistributed freely as long as they are not sold by themselves. The
|
|
||||||
fonts, including any derivative works, can be bundled, embedded,
|
|
||||||
redistributed and/or sold with any software provided that any reserved
|
|
||||||
names are not used by derivative works. The fonts and derivatives,
|
|
||||||
however, cannot be released under any other type of license. The
|
|
||||||
requirement for fonts to remain under this license does not apply
|
|
||||||
to any document created using the fonts or their derivatives.
|
|
||||||
|
|
||||||
DEFINITIONS
|
|
||||||
"Font Software" refers to the set of files released by the Copyright
|
|
||||||
Holder(s) under this license and clearly marked as such. This may
|
|
||||||
include source files, build scripts and documentation.
|
|
||||||
|
|
||||||
"Reserved Font Name" refers to any names specified as such after the
|
|
||||||
copyright statement(s).
|
|
||||||
|
|
||||||
"Original Version" refers to the collection of Font Software components as
|
|
||||||
distributed by the Copyright Holder(s).
|
|
||||||
|
|
||||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
||||||
or substituting -- in part or in whole -- any of the components of the
|
|
||||||
Original Version, by changing formats or by porting the Font Software to a
|
|
||||||
new environment.
|
|
||||||
|
|
||||||
"Author" refers to any designer, engineer, programmer, technical
|
|
||||||
writer or other person who contributed to the Font Software.
|
|
||||||
|
|
||||||
PERMISSION & CONDITIONS
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
||||||
redistribute, and sell modified and unmodified copies of the Font
|
|
||||||
Software, subject to the following conditions:
|
|
||||||
|
|
||||||
1) Neither the Font Software nor any of its individual components,
|
|
||||||
in Original or Modified Versions, may be sold by itself.
|
|
||||||
|
|
||||||
2) Original or Modified Versions of the Font Software may be bundled,
|
|
||||||
redistributed and/or sold with any software, provided that each copy
|
|
||||||
contains the above copyright notice and this license. These can be
|
|
||||||
included either as stand-alone text files, human-readable headers or
|
|
||||||
in the appropriate machine-readable metadata fields within text or
|
|
||||||
binary files as long as those fields can be easily viewed by the user.
|
|
||||||
|
|
||||||
3) No Modified Version of the Font Software may use the Reserved Font
|
|
||||||
Name(s) unless explicit written permission is granted by the corresponding
|
|
||||||
Copyright Holder. This restriction only applies to the primary font name as
|
|
||||||
presented to the users.
|
|
||||||
|
|
||||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
||||||
Software shall not be used to promote, endorse or advertise any
|
|
||||||
Modified Version, except to acknowledge the contribution(s) of the
|
|
||||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
||||||
permission.
|
|
||||||
|
|
||||||
5) The Font Software, modified or unmodified, in part or in whole,
|
|
||||||
must be distributed entirely under this license, and must not be
|
|
||||||
distributed under any other license. The requirement for fonts to
|
|
||||||
remain under this license does not apply to any document created
|
|
||||||
using the Font Software.
|
|
||||||
|
|
||||||
TERMINATION
|
|
||||||
This license becomes null and void if any of the above conditions are
|
|
||||||
not met.
|
|
||||||
|
|
||||||
DISCLAIMER
|
|
||||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
||||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
||||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
||||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
||||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file not shown.
@ -1,10 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["lamport_sigs"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a>",];
|
|
||||||
|
|
||||||
if (window.register_implementors) {
|
|
||||||
window.register_implementors(implementors);
|
|
||||||
} else {
|
|
||||||
window.pending_implementors = implementors;
|
|
||||||
}
|
|
||||||
|
|
||||||
})()
|
|
@ -1,10 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["lamport_sigs"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> for <a class='struct' href='lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a>",];
|
|
||||||
|
|
||||||
if (window.register_implementors) {
|
|
||||||
window.register_implementors(implementors);
|
|
||||||
} else {
|
|
||||||
window.pending_implementors = implementors;
|
|
||||||
}
|
|
||||||
|
|
||||||
})()
|
|
@ -1,10 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["lamport_sigs"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a>",];
|
|
||||||
|
|
||||||
if (window.register_implementors) {
|
|
||||||
window.register_implementors(implementors);
|
|
||||||
} else {
|
|
||||||
window.pending_implementors = implementors;
|
|
||||||
}
|
|
||||||
|
|
||||||
})()
|
|
@ -1,10 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["lamport_sigs"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html' title='core::convert::From'>From</a><<a class='struct' href='lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a>> for <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>",];
|
|
||||||
|
|
||||||
if (window.register_implementors) {
|
|
||||||
window.register_implementors(implementors);
|
|
||||||
} else {
|
|
||||||
window.pending_implementors = implementors;
|
|
||||||
}
|
|
||||||
|
|
||||||
})()
|
|
@ -1,10 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["lamport_sigs"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a>","impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a>",];
|
|
||||||
|
|
||||||
if (window.register_implementors) {
|
|
||||||
window.register_implementors(implementors);
|
|
||||||
} else {
|
|
||||||
window.pending_implementors = implementors;
|
|
||||||
}
|
|
||||||
|
|
||||||
})()
|
|
@ -1,10 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["lamport_sigs"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> for <a class='struct' href='lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a>",];
|
|
||||||
|
|
||||||
if (window.register_implementors) {
|
|
||||||
window.register_implementors(implementors);
|
|
||||||
} else {
|
|
||||||
window.pending_implementors = implementors;
|
|
||||||
}
|
|
||||||
|
|
||||||
})()
|
|
@ -1,10 +0,0 @@
|
|||||||
(function() {var implementors = {};
|
|
||||||
implementors["lamport_sigs"] = ["impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html' title='core::ops::Drop'>Drop</a> for <a class='struct' href='lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a>",];
|
|
||||||
|
|
||||||
if (window.register_implementors) {
|
|
||||||
window.register_implementors(implementors);
|
|
||||||
} else {
|
|
||||||
window.pending_implementors = implementors;
|
|
||||||
}
|
|
||||||
|
|
||||||
})()
|
|
4
docs/jquery.js
vendored
4
docs/jquery.js
vendored
File diff suppressed because one or more lines are too long
@ -1,10 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="refresh" content="0;URL=type.LamportSignatureData.html">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>Redirecting to <a href="type.LamportSignatureData.html">type.LamportSignatureData.html</a>...</p>
|
|
||||||
<script>location.replace("type.LamportSignatureData.html" + location.search + location.hash);</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,10 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="refresh" content="0;URL=struct.PrivateKey.html">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>Redirecting to <a href="struct.PrivateKey.html">struct.PrivateKey.html</a>...</p>
|
|
||||||
<script>location.replace("struct.PrivateKey.html" + location.search + location.hash);</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,10 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="refresh" content="0;URL=struct.PublicKey.html">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>Redirecting to <a href="struct.PublicKey.html">struct.PublicKey.html</a>...</p>
|
|
||||||
<script>location.replace("struct.PublicKey.html" + location.search + location.hash);</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,138 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta name="generator" content="rustdoc">
|
|
||||||
<meta name="description" content="API documentation for the Rust `lamport_sigs` crate.">
|
|
||||||
<meta name="keywords" content="rust, rustlang, rust-lang, lamport_sigs">
|
|
||||||
|
|
||||||
<title>lamport_sigs - Rust</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
|
||||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body class="rustdoc">
|
|
||||||
<!--[if lte IE 8]>
|
|
||||||
<div class="warning">
|
|
||||||
This old browser is unsupported and will most likely display funky
|
|
||||||
things.
|
|
||||||
</div>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<nav class="sidebar">
|
|
||||||
|
|
||||||
<p class='location'></p><script>window.sidebarCurrent = {name: 'lamport_sigs', ty: 'mod', relpath: '../'};</script>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<nav class="sub">
|
|
||||||
<form class="search-form js-only">
|
|
||||||
<div class="search-container">
|
|
||||||
<input class="search-input" name="search"
|
|
||||||
autocomplete="off"
|
|
||||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
|
||||||
type="search">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<section id='main' class="content mod">
|
|
||||||
<h1 class='fqn'><span class='in-band'>Crate <a class='mod' href=''>lamport_sigs</a></span><span class='out-of-band'><span id='render-detail'>
|
|
||||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
|
||||||
[<span class='inner'>−</span>]
|
|
||||||
</a>
|
|
||||||
</span><a id='src-0' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#1-269' title='goto source code'>[src]</a></span></h1>
|
|
||||||
<div class='docblock'><p><em>lamport</em> implements one-time hash-based signatures using the Lamport signature scheme.</p>
|
|
||||||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
|
||||||
<table>
|
|
||||||
<tr class=' module-item'>
|
|
||||||
<td><a class='struct' href='struct.PrivateKey.html'
|
|
||||||
title='lamport_sigs::PrivateKey'>PrivateKey</a></td>
|
|
||||||
<td class='docblock-short'>
|
|
||||||
<p>A one-time signing private key</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class=' module-item'>
|
|
||||||
<td><a class='struct' href='struct.PublicKey.html'
|
|
||||||
title='lamport_sigs::PublicKey'>PublicKey</a></td>
|
|
||||||
<td class='docblock-short'>
|
|
||||||
<p>A one-time signing public key</p>
|
|
||||||
</td>
|
|
||||||
</tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
|
|
||||||
<table>
|
|
||||||
<tr class=' module-item'>
|
|
||||||
<td><a class='type' href='type.LamportSignatureData.html'
|
|
||||||
title='lamport_sigs::LamportSignatureData'>LamportSignatureData</a></td>
|
|
||||||
<td class='docblock-short'>
|
|
||||||
<p>A type alias defining a Lamport signature</p>
|
|
||||||
</td>
|
|
||||||
</tr></table></section>
|
|
||||||
<section id='search' class="content hidden"></section>
|
|
||||||
|
|
||||||
<section class="footer"></section>
|
|
||||||
|
|
||||||
<aside id="help" class="hidden">
|
|
||||||
<div>
|
|
||||||
<h1 class="hidden">Help</h1>
|
|
||||||
|
|
||||||
<div class="shortcuts">
|
|
||||||
<h2>Keyboard Shortcuts</h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>?</dt>
|
|
||||||
<dd>Show this help dialog</dd>
|
|
||||||
<dt>S</dt>
|
|
||||||
<dd>Focus the search field</dd>
|
|
||||||
<dt>⇤</dt>
|
|
||||||
<dd>Move up in search results</dd>
|
|
||||||
<dt>⇥</dt>
|
|
||||||
<dd>Move down in search results</dd>
|
|
||||||
<dt>⏎</dt>
|
|
||||||
<dd>Go to active search result</dd>
|
|
||||||
<dt>+</dt>
|
|
||||||
<dd>Collapse/expand all sections</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="infos">
|
|
||||||
<h2>Search Tricks</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Prefix searches with a type followed by a colon (e.g.
|
|
||||||
<code>fn:</code>) to restrict the search to a given type.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
|
||||||
<code>struct</code>, <code>enum</code>,
|
|
||||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
|
||||||
and <code>const</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Search functions by type signature (e.g.
|
|
||||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
window.rootPath = "../";
|
|
||||||
window.currentCrate = "lamport_sigs";
|
|
||||||
window.playgroundUrl = "";
|
|
||||||
</script>
|
|
||||||
<script src="../jquery.js"></script>
|
|
||||||
<script src="../main.js"></script>
|
|
||||||
|
|
||||||
<script defer src="../search-index.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1 +0,0 @@
|
|||||||
initSidebarItems({"struct":[["PrivateKey","A one-time signing private key"],["PublicKey","A one-time signing public key"]],"type":[["LamportSignatureData","A type alias defining a Lamport signature"]]});
|
|
@ -1,139 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta name="generator" content="rustdoc">
|
|
||||||
<meta name="description" content="API documentation for the Rust `PrivateKey` struct in crate `lamport_sigs`.">
|
|
||||||
<meta name="keywords" content="rust, rustlang, rust-lang, PrivateKey">
|
|
||||||
|
|
||||||
<title>lamport_sigs::PrivateKey - Rust</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
|
||||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body class="rustdoc">
|
|
||||||
<!--[if lte IE 8]>
|
|
||||||
<div class="warning">
|
|
||||||
This old browser is unsupported and will most likely display funky
|
|
||||||
things.
|
|
||||||
</div>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<nav class="sidebar">
|
|
||||||
|
|
||||||
<p class='location'><a href='index.html'>lamport_sigs</a></p><script>window.sidebarCurrent = {name: 'PrivateKey', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<nav class="sub">
|
|
||||||
<form class="search-form js-only">
|
|
||||||
<div class="search-container">
|
|
||||||
<input class="search-input" name="search"
|
|
||||||
autocomplete="off"
|
|
||||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
|
||||||
type="search">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<section id='main' class="content struct">
|
|
||||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>lamport_sigs</a>::<wbr><a class='struct' href=''>PrivateKey</a></span><span class='out-of-band'><span id='render-detail'>
|
|
||||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
|
||||||
[<span class='inner'>−</span>]
|
|
||||||
</a>
|
|
||||||
</span><a id='src-39' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#52-58' title='goto source code'>[src]</a></span></h1>
|
|
||||||
<pre class='rust struct'>pub struct PrivateKey { /* fields omitted */ }</pre><div class='docblock'><p>A one-time signing private key</p>
|
|
||||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-103' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#147-231' title='goto source code'>[src]</a></span></h3>
|
|
||||||
<div class='impl-items'><h4 id='method.new' class='method'><span id='new.v' class='invisible'><code>fn <a href='#method.new' class='fnname'>new</a>(algorithm: &'static <a class='struct' href='https://briansmith.org/rustdoc/ring/digest/struct.Algorithm.html' title='ring::digest::Algorithm'>Algorithm</a>) -> <a class='struct' href='../lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a></code></span></h4>
|
|
||||||
<div class='docblock'><p>Generates a new random one-time signing key. This method can panic if OS RNG fails</p>
|
|
||||||
</div><h4 id='method.public_key' class='method'><span id='public_key.v' class='invisible'><code>fn <a href='#method.public_key' class='fnname'>public_key</a>(&self) -> <a class='struct' href='../lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a></code></span></h4>
|
|
||||||
<div class='docblock'><p>Returns the public key associated with this private key</p>
|
|
||||||
</div><h4 id='method.sign' class='method'><span id='sign.v' class='invisible'><code>fn <a href='#method.sign' class='fnname'>sign</a>(&mut self, data: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='type' href='../lamport_sigs/type.LamportSignatureData.html' title='lamport_sigs::LamportSignatureData'>LamportSignatureData</a>, &'static <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>></code></span></h4>
|
|
||||||
<div class='docblock'><p>Signs the data with the private key and returns the result if successful.
|
|
||||||
If unsuccesful, an explanation string is returned</p>
|
|
||||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-44' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#51' title='goto source code'>[src]</a></span></h3>
|
|
||||||
<div class='impl-items'><h4 id='method.clone' class='method'><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a></code></span></h4>
|
|
||||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
|
||||||
</div><h4 id='method.clone_from' class='method'><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></span></h4>
|
|
||||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
|
||||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-51' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#51' title='goto source code'>[src]</a></span></h3>
|
|
||||||
<div class='impl-items'><h4 id='method.fmt' class='method'><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></span></h4>
|
|
||||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
|
||||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html' title='core::ops::Drop'>Drop</a> for <a class='struct' href='../lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-142' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#233-246' title='goto source code'>[src]</a></span></h3>
|
|
||||||
<div class='impl-items'><h4 id='method.drop' class='method'><span id='drop.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html#tymethod.drop' class='fnname'>drop</a>(&mut self)</code></span></h4>
|
|
||||||
<div class='docblock'><p>A method called when the value goes out of scope. <a href="https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html#tymethod.drop">Read more</a></p>
|
|
||||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-150' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#248-266' title='goto source code'>[src]</a></span></h3>
|
|
||||||
<div class='impl-items'><h4 id='method.eq' class='method'><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &<a class='struct' href='../lamport_sigs/struct.PrivateKey.html' title='lamport_sigs::PrivateKey'>PrivateKey</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></span></h4>
|
|
||||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
|
||||||
</div><h4 id='method.ne' class='method'><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &Rhs) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></span></h4>
|
|
||||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
|
||||||
</div></div></section>
|
|
||||||
<section id='search' class="content hidden"></section>
|
|
||||||
|
|
||||||
<section class="footer"></section>
|
|
||||||
|
|
||||||
<aside id="help" class="hidden">
|
|
||||||
<div>
|
|
||||||
<h1 class="hidden">Help</h1>
|
|
||||||
|
|
||||||
<div class="shortcuts">
|
|
||||||
<h2>Keyboard Shortcuts</h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>?</dt>
|
|
||||||
<dd>Show this help dialog</dd>
|
|
||||||
<dt>S</dt>
|
|
||||||
<dd>Focus the search field</dd>
|
|
||||||
<dt>⇤</dt>
|
|
||||||
<dd>Move up in search results</dd>
|
|
||||||
<dt>⇥</dt>
|
|
||||||
<dd>Move down in search results</dd>
|
|
||||||
<dt>⏎</dt>
|
|
||||||
<dd>Go to active search result</dd>
|
|
||||||
<dt>+</dt>
|
|
||||||
<dd>Collapse/expand all sections</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="infos">
|
|
||||||
<h2>Search Tricks</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Prefix searches with a type followed by a colon (e.g.
|
|
||||||
<code>fn:</code>) to restrict the search to a given type.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
|
||||||
<code>struct</code>, <code>enum</code>,
|
|
||||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
|
||||||
and <code>const</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Search functions by type signature (e.g.
|
|
||||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
window.rootPath = "../";
|
|
||||||
window.currentCrate = "lamport_sigs";
|
|
||||||
window.playgroundUrl = "";
|
|
||||||
</script>
|
|
||||||
<script src="../jquery.js"></script>
|
|
||||||
<script src="../main.js"></script>
|
|
||||||
|
|
||||||
<script defer src="../search-index.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,142 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta name="generator" content="rustdoc">
|
|
||||||
<meta name="description" content="API documentation for the Rust `PublicKey` struct in crate `lamport_sigs`.">
|
|
||||||
<meta name="keywords" content="rust, rustlang, rust-lang, PublicKey">
|
|
||||||
|
|
||||||
<title>lamport_sigs::PublicKey - Rust</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
|
||||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body class="rustdoc">
|
|
||||||
<!--[if lte IE 8]>
|
|
||||||
<div class="warning">
|
|
||||||
This old browser is unsupported and will most likely display funky
|
|
||||||
things.
|
|
||||||
</div>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<nav class="sidebar">
|
|
||||||
|
|
||||||
<p class='location'><a href='index.html'>lamport_sigs</a></p><script>window.sidebarCurrent = {name: 'PublicKey', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<nav class="sub">
|
|
||||||
<form class="search-form js-only">
|
|
||||||
<div class="search-container">
|
|
||||||
<input class="search-input" name="search"
|
|
||||||
autocomplete="off"
|
|
||||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
|
||||||
type="search">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<section id='main' class="content struct">
|
|
||||||
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>lamport_sigs</a>::<wbr><a class='struct' href=''>PublicKey</a></span><span class='out-of-band'><span id='render-detail'>
|
|
||||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
|
||||||
[<span class='inner'>−</span>]
|
|
||||||
</a>
|
|
||||||
</span><a id='src-11' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#24-28' title='goto source code'>[src]</a></span></h1>
|
|
||||||
<pre class='rust struct'>pub struct PublicKey { /* fields omitted */ }</pre><div class='docblock'><p>A one-time signing public key</p>
|
|
||||||
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-63' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#66-145' title='goto source code'>[src]</a></span></h3>
|
|
||||||
<div class='impl-items'><h4 id='method.from_vec' class='method'><span id='from_vec.v' class='invisible'><code>fn <a href='#method.from_vec' class='fnname'>from_vec</a>(vec: <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>, algorithm: &'static <a class='struct' href='https://briansmith.org/rustdoc/ring/digest/struct.Algorithm.html' title='ring::digest::Algorithm'>Algorithm</a>) -> <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a><<a class='struct' href='../lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a>></code></span></h4>
|
|
||||||
<div class='docblock'><p>Intializes a public key with a byte vector.
|
|
||||||
Returns <code>None</code> if it couldn't parse the provided data</p>
|
|
||||||
</div><h4 id='method.to_bytes' class='method'><span id='to_bytes.v' class='invisible'><code>fn <a href='#method.to_bytes' class='fnname'>to_bytes</a>(&self) -> <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>></code></span></h4>
|
|
||||||
<div class='docblock'><p>Serializes a public key into a byte vector</p>
|
|
||||||
</div><h4 id='method.verify_signature' class='method'><span id='verify_signature.v' class='invisible'><code>fn <a href='#method.verify_signature' class='fnname'>verify_signature</a>(&self, signature: &<a class='type' href='../lamport_sigs/type.LamportSignatureData.html' title='lamport_sigs::LamportSignatureData'>LamportSignatureData</a>, data: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a><a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>]</a>) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></span></h4>
|
|
||||||
<div class='docblock'><p>Verifies that the signature of the data is correctly signed with the given key</p>
|
|
||||||
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-15' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#23' title='goto source code'>[src]</a></span></h3>
|
|
||||||
<div class='impl-items'><h4 id='method.clone' class='method'><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class='struct' href='../lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a></code></span></h4>
|
|
||||||
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
|
||||||
</div><h4 id='method.clone_from' class='method'><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></span></h4>
|
|
||||||
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
|
||||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-21' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#23' title='goto source code'>[src]</a></span></h3>
|
|
||||||
<div class='impl-items'><h4 id='method.fmt' class='method'><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></span></h4>
|
|
||||||
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
|
||||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-29' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#30-37' title='goto source code'>[src]</a></span></h3>
|
|
||||||
<div class='impl-items'><h4 id='method.eq' class='method'><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, other: &Self) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></span></h4>
|
|
||||||
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
|
||||||
</div><h4 id='method.ne' class='method'><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &Rhs) -> <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></span></h4>
|
|
||||||
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
|
||||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html' title='core::hash::Hash'>Hash</a> for <a class='struct' href='../lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-33' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#39-46' title='goto source code'>[src]</a></span></h3>
|
|
||||||
<div class='impl-items'><h4 id='method.hash' class='method'><span id='hash.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a><H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a>>(&self, state: &mut H)</code></span></h4>
|
|
||||||
<div class='docblock'><p>Feeds this value into the state given, updating the hasher as necessary.</p>
|
|
||||||
</div><h4 id='method.hash_slice' class='method'><span id='hash_slice.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a><H>(data: <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.slice.html'>&[Self]</a>, state: &mut H) <span class='where'>where H: <a class='trait' href='https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html' title='core::hash::Hasher'>Hasher</a></span></code><div class='since' title='Stable since Rust version 1.3.0'>1.3.0</div></span></h4>
|
|
||||||
<div class='docblock'><p>Feeds a slice of this type into the state provided.</p>
|
|
||||||
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html' title='core::cmp::Eq'>Eq</a> for <a class='struct' href='../lamport_sigs/struct.PublicKey.html' title='lamport_sigs::PublicKey'>PublicKey</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-38' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#48' title='goto source code'>[src]</a></span></h3>
|
|
||||||
<div class='impl-items'></div></section>
|
|
||||||
<section id='search' class="content hidden"></section>
|
|
||||||
|
|
||||||
<section class="footer"></section>
|
|
||||||
|
|
||||||
<aside id="help" class="hidden">
|
|
||||||
<div>
|
|
||||||
<h1 class="hidden">Help</h1>
|
|
||||||
|
|
||||||
<div class="shortcuts">
|
|
||||||
<h2>Keyboard Shortcuts</h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>?</dt>
|
|
||||||
<dd>Show this help dialog</dd>
|
|
||||||
<dt>S</dt>
|
|
||||||
<dd>Focus the search field</dd>
|
|
||||||
<dt>⇤</dt>
|
|
||||||
<dd>Move up in search results</dd>
|
|
||||||
<dt>⇥</dt>
|
|
||||||
<dd>Move down in search results</dd>
|
|
||||||
<dt>⏎</dt>
|
|
||||||
<dd>Go to active search result</dd>
|
|
||||||
<dt>+</dt>
|
|
||||||
<dd>Collapse/expand all sections</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="infos">
|
|
||||||
<h2>Search Tricks</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Prefix searches with a type followed by a colon (e.g.
|
|
||||||
<code>fn:</code>) to restrict the search to a given type.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
|
||||||
<code>struct</code>, <code>enum</code>,
|
|
||||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
|
||||||
and <code>const</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Search functions by type signature (e.g.
|
|
||||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
window.rootPath = "../";
|
|
||||||
window.currentCrate = "lamport_sigs";
|
|
||||||
window.playgroundUrl = "";
|
|
||||||
</script>
|
|
||||||
<script src="../jquery.js"></script>
|
|
||||||
<script src="../main.js"></script>
|
|
||||||
|
|
||||||
<script defer src="../search-index.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,115 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta name="generator" content="rustdoc">
|
|
||||||
<meta name="description" content="API documentation for the Rust `LamportSignatureData` type in crate `lamport_sigs`.">
|
|
||||||
<meta name="keywords" content="rust, rustlang, rust-lang, LamportSignatureData">
|
|
||||||
|
|
||||||
<title>lamport_sigs::LamportSignatureData - Rust</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../rustdoc.css">
|
|
||||||
<link rel="stylesheet" type="text/css" href="../main.css">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body class="rustdoc">
|
|
||||||
<!--[if lte IE 8]>
|
|
||||||
<div class="warning">
|
|
||||||
This old browser is unsupported and will most likely display funky
|
|
||||||
things.
|
|
||||||
</div>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<nav class="sidebar">
|
|
||||||
|
|
||||||
<p class='location'><a href='index.html'>lamport_sigs</a></p><script>window.sidebarCurrent = {name: 'LamportSignatureData', ty: 'type', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<nav class="sub">
|
|
||||||
<form class="search-form js-only">
|
|
||||||
<div class="search-container">
|
|
||||||
<input class="search-input" name="search"
|
|
||||||
autocomplete="off"
|
|
||||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
|
||||||
type="search">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<section id='main' class="content type">
|
|
||||||
<h1 class='fqn'><span class='in-band'>Type Definition <a href='index.html'>lamport_sigs</a>::<wbr><a class='type' href=''>LamportSignatureData</a></span><span class='out-of-band'><span id='render-detail'>
|
|
||||||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
|
||||||
[<span class='inner'>−</span>]
|
|
||||||
</a>
|
|
||||||
</span><a id='src-10' class='srclink' href='../src/lamport_sigs/src/lib.rs.html#20' title='goto source code'>[src]</a></span></h1>
|
|
||||||
<pre class='rust typedef'>type LamportSignatureData = <a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='struct' href='https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html' title='collections::vec::Vec'>Vec</a><<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a>>>;</pre><div class='docblock'><p>A type alias defining a Lamport signature</p>
|
|
||||||
</div></section>
|
|
||||||
<section id='search' class="content hidden"></section>
|
|
||||||
|
|
||||||
<section class="footer"></section>
|
|
||||||
|
|
||||||
<aside id="help" class="hidden">
|
|
||||||
<div>
|
|
||||||
<h1 class="hidden">Help</h1>
|
|
||||||
|
|
||||||
<div class="shortcuts">
|
|
||||||
<h2>Keyboard Shortcuts</h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>?</dt>
|
|
||||||
<dd>Show this help dialog</dd>
|
|
||||||
<dt>S</dt>
|
|
||||||
<dd>Focus the search field</dd>
|
|
||||||
<dt>⇤</dt>
|
|
||||||
<dd>Move up in search results</dd>
|
|
||||||
<dt>⇥</dt>
|
|
||||||
<dd>Move down in search results</dd>
|
|
||||||
<dt>⏎</dt>
|
|
||||||
<dd>Go to active search result</dd>
|
|
||||||
<dt>+</dt>
|
|
||||||
<dd>Collapse/expand all sections</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="infos">
|
|
||||||
<h2>Search Tricks</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Prefix searches with a type followed by a colon (e.g.
|
|
||||||
<code>fn:</code>) to restrict the search to a given type.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
|
||||||
<code>struct</code>, <code>enum</code>,
|
|
||||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
|
||||||
and <code>const</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Search functions by type signature (e.g.
|
|
||||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
window.rootPath = "../";
|
|
||||||
window.currentCrate = "lamport_sigs";
|
|
||||||
window.playgroundUrl = "";
|
|
||||||
</script>
|
|
||||||
<script src="../jquery.js"></script>
|
|
||||||
<script src="../main.js"></script>
|
|
||||||
|
|
||||||
<script defer src="../search-index.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
133
docs/main.css
133
docs/main.css
@ -1,133 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
|
||||||
* file at the top-level directory of this distribution and at
|
|
||||||
* http://rust-lang.org/COPYRIGHT.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
||||||
* <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
||||||
* option. This file may not be copied, modified, or distributed
|
|
||||||
* except according to those terms.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* General structure and fonts */
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: white;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
h1.fqn {
|
|
||||||
border-bottom-color: #D5D5D5;
|
|
||||||
}
|
|
||||||
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
|
|
||||||
border-bottom-color: #DDDDDD;
|
|
||||||
}
|
|
||||||
.in-band {
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.stability > em > code {
|
|
||||||
background-color: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docblock code, .docblock-short code {
|
|
||||||
background-color: #F5F5F5;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
background-color: #F5F5F5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar .location {
|
|
||||||
background: #e1e1e1;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.block a:hover {
|
|
||||||
background: #F5F5F5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line-numbers span { color: #c67e2d; }
|
|
||||||
.line-numbers .line-highlighted {
|
|
||||||
background-color: #f6fdb0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:target { background: #FDFFD3; }
|
|
||||||
.content .highlighted {
|
|
||||||
color: #000 !important;
|
|
||||||
background-color: #ccc;
|
|
||||||
}
|
|
||||||
.content .highlighted a, .content .highlighted span { color: #000 !important; }
|
|
||||||
.content .highlighted.trait { background-color: #fece7e; }
|
|
||||||
.content .highlighted.mod { background-color: #afc6e4; }
|
|
||||||
.content .highlighted.enum { background-color: #b4d1b9; }
|
|
||||||
.content .highlighted.struct { background-color: #e7b1a0; }
|
|
||||||
.content .highlighted.fn { background-color: #c6afb3; }
|
|
||||||
.content .highlighted.method { background-color: #c6afb3; }
|
|
||||||
.content .highlighted.tymethod { background-color: #c6afb3; }
|
|
||||||
.content .highlighted.type { background-color: #c6afb3; }
|
|
||||||
|
|
||||||
.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
|
|
||||||
border-bottom-color: #DDD;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docblock table {
|
|
||||||
border-color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docblock table td {
|
|
||||||
border-top-color: #ddd;
|
|
||||||
border-bottom-color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docblock table th {
|
|
||||||
border-top-color: #ddd;
|
|
||||||
border-bottom-color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content span.primitive, .content a.primitive, .block a.current.primitive { color: #39a7bf; }
|
|
||||||
.content span.externcrate,
|
|
||||||
.content span.mod, .content a.mod, .block a.current.mod { color: #4d76ae; }
|
|
||||||
.content span.fn, .content a.fn, .block a.current.fn,
|
|
||||||
.content span.method, .content a.method, .block a.current.method,
|
|
||||||
.content span.tymethod, .content a.tymethod, .block a.current.tymethod,
|
|
||||||
.content .fnname { color: #8c6067; }
|
|
||||||
|
|
||||||
pre.rust .comment { color: #8E908C; }
|
|
||||||
pre.rust .doccomment { color: #4D4D4C; }
|
|
||||||
|
|
||||||
nav {
|
|
||||||
border-bottom-color: #e0e0e0;
|
|
||||||
}
|
|
||||||
nav.main .current {
|
|
||||||
border-top-color: #000;
|
|
||||||
border-bottom-color: #000;
|
|
||||||
}
|
|
||||||
nav.main .separator {
|
|
||||||
border: 1px solid #000;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docblock a, .docblock-short a, .stability a {
|
|
||||||
color: #3873AD;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.test-arrow {
|
|
||||||
color: #f5f5f5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content span.trait, .content a.trait, .block a.current.trait { color: #7c5af3; }
|
|
||||||
|
|
||||||
.search-input {
|
|
||||||
color: #555;
|
|
||||||
box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
em.stab.unstable { background: #FFF5D6; border-color: #FFC600; }
|
|
||||||
em.stab.deprecated { background: #F3DFFF; border-color: #7F0087; }
|
|
1046
docs/main.js
1046
docs/main.js
File diff suppressed because it is too large
Load Diff
1
docs/normalize.css
vendored
1
docs/normalize.css
vendored
@ -1 +0,0 @@
|
|||||||
/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}
|
|
@ -1,43 +0,0 @@
|
|||||||
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
|
|
||||||
// file at the top-level directory of this distribution and at
|
|
||||||
// http://rust-lang.org/COPYRIGHT.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
||||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
||||||
// option. This file may not be copied, modified, or distributed
|
|
||||||
// except according to those terms.
|
|
||||||
|
|
||||||
/*jslint browser: true, es5: true */
|
|
||||||
/*globals $: true, rootPath: true */
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
if (!window.playgroundUrl) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var featureRegexp = new RegExp('^\s*#!\\[feature\\(\.*?\\)\\]');
|
|
||||||
var elements = document.querySelectorAll('pre.rust-example-rendered');
|
|
||||||
|
|
||||||
Array.prototype.forEach.call(elements, function(el) {
|
|
||||||
el.onmouseover = function(e) {
|
|
||||||
if (el.contains(e.relatedTarget)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var a = el.querySelectorAll('a.test-arrow')[0];
|
|
||||||
|
|
||||||
var code = el.previousElementSibling.textContent;
|
|
||||||
|
|
||||||
var channel = '';
|
|
||||||
if (featureRegexp.test(code)) {
|
|
||||||
channel = '&version=nightly';
|
|
||||||
}
|
|
||||||
|
|
||||||
a.setAttribute('href', window.playgroundUrl + '?code=' +
|
|
||||||
encodeURIComponent(code) + channel);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
751
docs/rustdoc.css
751
docs/rustdoc.css
@ -1,751 +0,0 @@
|
|||||||
@import "normalize.css";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
|
||||||
* file at the top-level directory of this distribution and at
|
|
||||||
* http://rust-lang.org/COPYRIGHT.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
||||||
* <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
||||||
* option. This file may not be copied, modified, or distributed
|
|
||||||
* except according to those terms.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* See FiraSans-LICENSE.txt for the Fira Sans license. */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Fira Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Fira Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 500;
|
|
||||||
src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
|
|
||||||
}
|
|
||||||
|
|
||||||
/* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license and
|
|
||||||
* Heuristica-LICENSE.txt for the Heuristica license. */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Serif Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Serif Pro';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 400;
|
|
||||||
src: url("Heuristica-Italic.woff") format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Serif Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
|
|
||||||
}
|
|
||||||
|
|
||||||
/* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Code Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Source Code Pro';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 600;
|
|
||||||
src: local('Source Code Pro Semibold'), url("SourceCodePro-Semibold.woff") format('woff');
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* General structure and fonts */
|
|
||||||
|
|
||||||
body {
|
|
||||||
font: 16px/1.4 "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
|
|
||||||
margin: 0;
|
|
||||||
position: relative;
|
|
||||||
padding: 10px 15px 20px 15px;
|
|
||||||
|
|
||||||
-webkit-font-feature-settings: "kern", "liga";
|
|
||||||
-moz-font-feature-settings: "kern", "liga";
|
|
||||||
font-feature-settings: "kern", "liga";
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
font-size: 1.4em;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
font-size: 1.3em;
|
|
||||||
}
|
|
||||||
h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
|
|
||||||
font-weight: 500;
|
|
||||||
margin: 20px 0 15px 0;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
}
|
|
||||||
h1.fqn {
|
|
||||||
border-bottom: 1px dashed;
|
|
||||||
margin-top: 0;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
|
|
||||||
border-bottom: 1px solid;
|
|
||||||
}
|
|
||||||
h3.impl, h3.method, h4.method, h3.type, h4.type {
|
|
||||||
font-weight: 600;
|
|
||||||
margin-top: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
h3.impl, h3.method, h3.type {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
h1, h2, h3, h4, .sidebar, a.source, .search-input, .content table :not(code)>a, .collapse-toggle {
|
|
||||||
font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol, ul {
|
|
||||||
padding-left: 25px;
|
|
||||||
}
|
|
||||||
ul ul, ol ul, ul ol, ol ol {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0 0 .6em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
code, pre {
|
|
||||||
font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
|
||||||
.docblock code, .docblock-short code {
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 0 0.2em;
|
|
||||||
}
|
|
||||||
.docblock pre code, .docblock-short pre code {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
padding: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.source pre {
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content.source {
|
|
||||||
margin-top: 50px;
|
|
||||||
max-width: none;
|
|
||||||
overflow: visible;
|
|
||||||
margin-left: 0px;
|
|
||||||
min-width: 70em;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav.sub {
|
|
||||||
font-size: 16px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar {
|
|
||||||
width: 200px;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
min-height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content, nav { max-width: 960px; }
|
|
||||||
|
|
||||||
/* Everything else */
|
|
||||||
|
|
||||||
.js-only, .hidden { display: none !important; }
|
|
||||||
|
|
||||||
.sidebar {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
.sidebar img {
|
|
||||||
margin: 20px auto;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar .location {
|
|
||||||
font-size: 17px;
|
|
||||||
margin: 30px 0 20px 0;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.location a:first-child { font-weight: 500; }
|
|
||||||
|
|
||||||
.block {
|
|
||||||
padding: 0 10px;
|
|
||||||
margin-bottom: 14px;
|
|
||||||
}
|
|
||||||
.block h2, .block h3 {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.block ul, .block li {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.block a {
|
|
||||||
display: block;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 7px 5px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 300;
|
|
||||||
transition: border 500ms ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding: 15px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content.source pre.rust {
|
|
||||||
white-space: pre;
|
|
||||||
overflow: auto;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
.content pre.line-numbers {
|
|
||||||
float: left;
|
|
||||||
border: none;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
.line-numbers span { cursor: pointer; }
|
|
||||||
|
|
||||||
.docblock-short p {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docblock-short.nowrap {
|
|
||||||
display: block;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docblock-short p {
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.docblock-short code { white-space: nowrap; }
|
|
||||||
|
|
||||||
.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
|
|
||||||
border-bottom: 1px solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docblock h1 { font-size: 1.3em; }
|
|
||||||
.docblock h2 { font-size: 1.15em; }
|
|
||||||
.docblock h3, .docblock h4, .docblock h5 { font-size: 1em; }
|
|
||||||
|
|
||||||
.docblock {
|
|
||||||
margin-left: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content .out-of-band {
|
|
||||||
font-size: 23px;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
text-align: right;
|
|
||||||
display: inline-block;
|
|
||||||
font-weight: normal;
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3.impl > .out-of-band {
|
|
||||||
font-size: 21px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h4 > code, h3 > code, .invisible > code {
|
|
||||||
position: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.in-band, code {
|
|
||||||
z-index: 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.invisible {
|
|
||||||
background: rgba(0, 0, 0, 0);
|
|
||||||
width: 100%;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content .in-band {
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main { position: relative; }
|
|
||||||
#main > .since {
|
|
||||||
top: inherit;
|
|
||||||
font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content table {
|
|
||||||
border-spacing: 0 5px;
|
|
||||||
border-collapse: separate;
|
|
||||||
}
|
|
||||||
.content td { vertical-align: top; }
|
|
||||||
.content td:first-child { padding-right: 20px; }
|
|
||||||
.content td p:first-child { margin-top: 0; }
|
|
||||||
.content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
|
|
||||||
|
|
||||||
.docblock table {
|
|
||||||
border: 1px solid;
|
|
||||||
margin: .5em 0;
|
|
||||||
border-collapse: collapse;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docblock table td {
|
|
||||||
padding: .5em;
|
|
||||||
border-top: 1px dashed;
|
|
||||||
border-bottom: 1px dashed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docblock table th {
|
|
||||||
padding: .5em;
|
|
||||||
text-align: left;
|
|
||||||
border-top: 1px solid;
|
|
||||||
border-bottom: 1px solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content .item-list {
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content .item-list li { margin-bottom: 3px; }
|
|
||||||
|
|
||||||
.content .multi-column {
|
|
||||||
-moz-column-count: 5;
|
|
||||||
-moz-column-gap: 2.5em;
|
|
||||||
-webkit-column-count: 5;
|
|
||||||
-webkit-column-gap: 2.5em;
|
|
||||||
column-count: 5;
|
|
||||||
column-gap: 2.5em;
|
|
||||||
}
|
|
||||||
.content .multi-column li { width: 100%; display: inline-block; }
|
|
||||||
|
|
||||||
.content .method {
|
|
||||||
font-size: 1em;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
/* Shift "where ..." part of method or fn definition down a line */
|
|
||||||
.content .method .where, .content .fn .where { display: block; }
|
|
||||||
/* Bit of whitespace to indent it */
|
|
||||||
.content .method .where::before, .content .fn .where::before { content: ' '; }
|
|
||||||
|
|
||||||
.content .methods > div { margin-left: 40px; }
|
|
||||||
|
|
||||||
.content .impl-items .docblock, .content .impl-items .stability {
|
|
||||||
margin-left: 40px;
|
|
||||||
}
|
|
||||||
.content .impl-items .method, .content .impl-items > .type {
|
|
||||||
margin-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content .stability code {
|
|
||||||
font-size: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Shift where in trait listing down a line */
|
|
||||||
pre.trait .where::before {
|
|
||||||
content: '\a ';
|
|
||||||
}
|
|
||||||
|
|
||||||
nav {
|
|
||||||
border-bottom: 1px solid;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
nav.main {
|
|
||||||
padding: 20px 0;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
nav.main .current {
|
|
||||||
border-top: 1px solid;
|
|
||||||
border-bottom: 1px solid;
|
|
||||||
}
|
|
||||||
nav.main .separator {
|
|
||||||
border: 1px solid;
|
|
||||||
display: inline-block;
|
|
||||||
height: 23px;
|
|
||||||
margin: 0 20px;
|
|
||||||
}
|
|
||||||
nav.sum { text-align: right; }
|
|
||||||
nav.sub form { display: inline; }
|
|
||||||
|
|
||||||
nav.sub, .content {
|
|
||||||
margin-left: 230px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
text-decoration: none;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.docblock a:hover, .docblock-short a:hover, .stability a {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; }
|
|
||||||
.content span.struct, .content a.struct, .block a.current.struct { color: #df3600; }
|
|
||||||
.content span.type, .content a.type, .block a.current.type { color: #e57300; }
|
|
||||||
.content span.macro, .content a.macro, .block a.current.macro { color: #068000; }
|
|
||||||
.block a.current.crate { font-weight: 500; }
|
|
||||||
|
|
||||||
.search-input {
|
|
||||||
width: 100%;
|
|
||||||
/* Override Normalize.css: we have margins and do
|
|
||||||
not want to overflow - the `moz` attribute is necessary
|
|
||||||
until Firefox 29, too early to drop at this point */
|
|
||||||
-moz-box-sizing: border-box !important;
|
|
||||||
box-sizing: border-box !important;
|
|
||||||
outline: none;
|
|
||||||
border: none;
|
|
||||||
border-radius: 1px;
|
|
||||||
margin-top: 5px;
|
|
||||||
padding: 10px 16px;
|
|
||||||
font-size: 17px;
|
|
||||||
transition: border-color 300ms ease;
|
|
||||||
transition: border-radius 300ms ease-in-out;
|
|
||||||
transition: box-shadow 300ms ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-input:focus {
|
|
||||||
border-color: #66afe9;
|
|
||||||
border-radius: 2px;
|
|
||||||
border: 0;
|
|
||||||
outline: 0;
|
|
||||||
box-shadow: 0 0 8px #078dd8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-results .desc {
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-results a {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content .search-results td:first-child { padding-right: 0; }
|
|
||||||
.content .search-results td:first-child a { padding-right: 10px; }
|
|
||||||
|
|
||||||
tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.blur > :not(#help) {
|
|
||||||
filter: blur(8px);
|
|
||||||
-webkit-filter: blur(8px);
|
|
||||||
opacity: .7;
|
|
||||||
}
|
|
||||||
|
|
||||||
#help {
|
|
||||||
width: 100%;
|
|
||||||
height: 100vh;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
#help > div {
|
|
||||||
flex: 0 0 auto;
|
|
||||||
background: #e9e9e9;
|
|
||||||
box-shadow: 0 0 6px rgba(0,0,0,.2);
|
|
||||||
width: 550px;
|
|
||||||
height: 330px;
|
|
||||||
border: 1px solid #bfbfbf;
|
|
||||||
}
|
|
||||||
#help dt {
|
|
||||||
float: left;
|
|
||||||
border-radius: 4px;
|
|
||||||
border: 1px solid #bfbfbf;
|
|
||||||
background: #fff;
|
|
||||||
width: 23px;
|
|
||||||
text-align: center;
|
|
||||||
clear: left;
|
|
||||||
display: block;
|
|
||||||
margin-top: -1px;
|
|
||||||
}
|
|
||||||
#help dd { margin: 5px 33px; }
|
|
||||||
#help .infos { padding-left: 0; }
|
|
||||||
#help h1, #help h2 { margin-top: 0; }
|
|
||||||
#help > div div {
|
|
||||||
width: 50%;
|
|
||||||
float: left;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
em.stab {
|
|
||||||
display: inline-block;
|
|
||||||
border-width: 1px;
|
|
||||||
border-style: solid;
|
|
||||||
padding: 3px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
font-size: 90%;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
em.stab p {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.module-item .stab {
|
|
||||||
border-width: 0;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
background: inherit !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.module-item.unstable {
|
|
||||||
opacity: 0.65;
|
|
||||||
}
|
|
||||||
|
|
||||||
.since {
|
|
||||||
font-weight: normal;
|
|
||||||
font-size: initial;
|
|
||||||
color: grey;
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.variants_table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.variants_table tbody tr td:first-child {
|
|
||||||
width: 1%; /* make the variant name as small as possible */
|
|
||||||
}
|
|
||||||
|
|
||||||
td.summary-column {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summary {
|
|
||||||
padding-right: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line-numbers :target { background-color: transparent; }
|
|
||||||
|
|
||||||
/* Code highlighting */
|
|
||||||
pre.rust .kw { color: #8959A8; }
|
|
||||||
pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
|
|
||||||
pre.rust .number, pre.rust .string { color: #718C00; }
|
|
||||||
pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val,
|
|
||||||
pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
|
|
||||||
pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
|
|
||||||
pre.rust .lifetime { color: #B76514; }
|
|
||||||
|
|
||||||
.rusttest { display: none; }
|
|
||||||
pre.rust { position: relative; }
|
|
||||||
a.test-arrow {
|
|
||||||
background-color: rgba(78, 139, 202, 0.2);
|
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
padding: 5px 10px 5px 10px;
|
|
||||||
border-radius: 5px;
|
|
||||||
font-size: 130%;
|
|
||||||
top: 5px;
|
|
||||||
right: 5px;
|
|
||||||
}
|
|
||||||
a.test-arrow:hover{
|
|
||||||
background-color: #4e8bca;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header:hover a:after {
|
|
||||||
content: '\2002\00a7\2002';
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header:hover a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-header a {
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.collapse-toggle {
|
|
||||||
font-weight: 300;
|
|
||||||
position: absolute;
|
|
||||||
left: -23px;
|
|
||||||
color: #999;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-wrapper > .collapse-toggle {
|
|
||||||
left: -24px;
|
|
||||||
margin-top: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-wrapper {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-wrapper.collapsed {
|
|
||||||
height: 1em;
|
|
||||||
transition: height .2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.collapse-toggle > .inner {
|
|
||||||
display: inline-block;
|
|
||||||
width: 1.2ch;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-label {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ghost {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ghost + .since {
|
|
||||||
position: initial;
|
|
||||||
display: table-cell;
|
|
||||||
}
|
|
||||||
|
|
||||||
.since + .srclink {
|
|
||||||
display: table-cell;
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.since {
|
|
||||||
position: initial;
|
|
||||||
font-size: 20px;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-wrapper > .collapse-toggle {
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.variant + .toggle-wrapper > a {
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
|
|
||||||
margin-left: 30px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.enum > .collapsed, .struct > .collapsed {
|
|
||||||
margin-bottom: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.enum .variant, .struct .structfield {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
:target > code {
|
|
||||||
background: #FDFFD3;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Media Queries */
|
|
||||||
|
|
||||||
@media (max-width: 700px) {
|
|
||||||
body {
|
|
||||||
padding-top: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar {
|
|
||||||
height: 40px;
|
|
||||||
min-height: 40px;
|
|
||||||
width: 100%;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
position: static;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar .location {
|
|
||||||
float: right;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 3px 10px 1px 10px;
|
|
||||||
min-height: 39px;
|
|
||||||
background: inherit;
|
|
||||||
text-align: left;
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar .location:empty {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar img {
|
|
||||||
width: 35px;
|
|
||||||
margin-top: 5px;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav.sub {
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar .block {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
margin-left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content .in-band {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content .out-of-band {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-wrapper > .collapse-toggle {
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-wrapper {
|
|
||||||
height: 1.5em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media print {
|
|
||||||
nav.sub, .content .out-of-band, .collapse-toggle {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
var searchIndex = {};
|
|
||||||
searchIndex["lamport_sigs"] = {"doc":"*lamport* implements one-time hash-based signatures using the Lamport signature scheme.","items":[[3,"PublicKey","lamport_sigs","A one-time signing public key",null,null],[3,"PrivateKey","","A one-time signing private key",null,null],[6,"LamportSignatureData","","A type alias defining a Lamport signature",null,null],[11,"clone","","",0,null],[11,"fmt","","",0,null],[11,"eq","","",0,null],[11,"hash","","",0,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"from_vec","","Intializes a public key with a byte vector.\nReturns `None` if it couldn't parse the provided data",0,{"inputs":[{"name":"vec"},{"name":"algorithm"}],"output":{"name":"option"}}],[11,"to_bytes","","Serializes a public key into a byte vector",0,null],[11,"verify_signature","","Verifies that the signature of the data is correctly signed with the given key",0,null],[11,"new","","Generates a new random one-time signing key. This method can panic if OS RNG fails",1,{"inputs":[{"name":"algorithm"}],"output":{"name":"privatekey"}}],[11,"public_key","","Returns the public key associated with this private key",1,null],[11,"sign","","Signs the data with the private key and returns the result if successful.\nIf unsuccesful, an explanation string is returned",1,null],[11,"drop","","",1,null],[11,"eq","","",1,null]],"paths":[[3,"PublicKey"],[3,"PrivateKey"]]};
|
|
||||||
initSearch(searchIndex);
|
|
@ -1,648 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta name="generator" content="rustdoc">
|
|
||||||
<meta name="description" content="Source to the Rust file `src/lib.rs`.">
|
|
||||||
<meta name="keywords" content="rust, rustlang, rust-lang">
|
|
||||||
|
|
||||||
<title>lib.rs.html -- source</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
|
|
||||||
<link rel="stylesheet" type="text/css" href="../../../main.css">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body class="rustdoc">
|
|
||||||
<!--[if lte IE 8]>
|
|
||||||
<div class="warning">
|
|
||||||
This old browser is unsupported and will most likely display funky
|
|
||||||
things.
|
|
||||||
</div>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<nav class="sidebar">
|
|
||||||
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<nav class="sub">
|
|
||||||
<form class="search-form js-only">
|
|
||||||
<div class="search-container">
|
|
||||||
<input class="search-input" name="search"
|
|
||||||
autocomplete="off"
|
|
||||||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
|
||||||
type="search">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<section id='main' class="content source"><pre class="line-numbers"><span id="1"> 1</span>
|
|
||||||
<span id="2"> 2</span>
|
|
||||||
<span id="3"> 3</span>
|
|
||||||
<span id="4"> 4</span>
|
|
||||||
<span id="5"> 5</span>
|
|
||||||
<span id="6"> 6</span>
|
|
||||||
<span id="7"> 7</span>
|
|
||||||
<span id="8"> 8</span>
|
|
||||||
<span id="9"> 9</span>
|
|
||||||
<span id="10"> 10</span>
|
|
||||||
<span id="11"> 11</span>
|
|
||||||
<span id="12"> 12</span>
|
|
||||||
<span id="13"> 13</span>
|
|
||||||
<span id="14"> 14</span>
|
|
||||||
<span id="15"> 15</span>
|
|
||||||
<span id="16"> 16</span>
|
|
||||||
<span id="17"> 17</span>
|
|
||||||
<span id="18"> 18</span>
|
|
||||||
<span id="19"> 19</span>
|
|
||||||
<span id="20"> 20</span>
|
|
||||||
<span id="21"> 21</span>
|
|
||||||
<span id="22"> 22</span>
|
|
||||||
<span id="23"> 23</span>
|
|
||||||
<span id="24"> 24</span>
|
|
||||||
<span id="25"> 25</span>
|
|
||||||
<span id="26"> 26</span>
|
|
||||||
<span id="27"> 27</span>
|
|
||||||
<span id="28"> 28</span>
|
|
||||||
<span id="29"> 29</span>
|
|
||||||
<span id="30"> 30</span>
|
|
||||||
<span id="31"> 31</span>
|
|
||||||
<span id="32"> 32</span>
|
|
||||||
<span id="33"> 33</span>
|
|
||||||
<span id="34"> 34</span>
|
|
||||||
<span id="35"> 35</span>
|
|
||||||
<span id="36"> 36</span>
|
|
||||||
<span id="37"> 37</span>
|
|
||||||
<span id="38"> 38</span>
|
|
||||||
<span id="39"> 39</span>
|
|
||||||
<span id="40"> 40</span>
|
|
||||||
<span id="41"> 41</span>
|
|
||||||
<span id="42"> 42</span>
|
|
||||||
<span id="43"> 43</span>
|
|
||||||
<span id="44"> 44</span>
|
|
||||||
<span id="45"> 45</span>
|
|
||||||
<span id="46"> 46</span>
|
|
||||||
<span id="47"> 47</span>
|
|
||||||
<span id="48"> 48</span>
|
|
||||||
<span id="49"> 49</span>
|
|
||||||
<span id="50"> 50</span>
|
|
||||||
<span id="51"> 51</span>
|
|
||||||
<span id="52"> 52</span>
|
|
||||||
<span id="53"> 53</span>
|
|
||||||
<span id="54"> 54</span>
|
|
||||||
<span id="55"> 55</span>
|
|
||||||
<span id="56"> 56</span>
|
|
||||||
<span id="57"> 57</span>
|
|
||||||
<span id="58"> 58</span>
|
|
||||||
<span id="59"> 59</span>
|
|
||||||
<span id="60"> 60</span>
|
|
||||||
<span id="61"> 61</span>
|
|
||||||
<span id="62"> 62</span>
|
|
||||||
<span id="63"> 63</span>
|
|
||||||
<span id="64"> 64</span>
|
|
||||||
<span id="65"> 65</span>
|
|
||||||
<span id="66"> 66</span>
|
|
||||||
<span id="67"> 67</span>
|
|
||||||
<span id="68"> 68</span>
|
|
||||||
<span id="69"> 69</span>
|
|
||||||
<span id="70"> 70</span>
|
|
||||||
<span id="71"> 71</span>
|
|
||||||
<span id="72"> 72</span>
|
|
||||||
<span id="73"> 73</span>
|
|
||||||
<span id="74"> 74</span>
|
|
||||||
<span id="75"> 75</span>
|
|
||||||
<span id="76"> 76</span>
|
|
||||||
<span id="77"> 77</span>
|
|
||||||
<span id="78"> 78</span>
|
|
||||||
<span id="79"> 79</span>
|
|
||||||
<span id="80"> 80</span>
|
|
||||||
<span id="81"> 81</span>
|
|
||||||
<span id="82"> 82</span>
|
|
||||||
<span id="83"> 83</span>
|
|
||||||
<span id="84"> 84</span>
|
|
||||||
<span id="85"> 85</span>
|
|
||||||
<span id="86"> 86</span>
|
|
||||||
<span id="87"> 87</span>
|
|
||||||
<span id="88"> 88</span>
|
|
||||||
<span id="89"> 89</span>
|
|
||||||
<span id="90"> 90</span>
|
|
||||||
<span id="91"> 91</span>
|
|
||||||
<span id="92"> 92</span>
|
|
||||||
<span id="93"> 93</span>
|
|
||||||
<span id="94"> 94</span>
|
|
||||||
<span id="95"> 95</span>
|
|
||||||
<span id="96"> 96</span>
|
|
||||||
<span id="97"> 97</span>
|
|
||||||
<span id="98"> 98</span>
|
|
||||||
<span id="99"> 99</span>
|
|
||||||
<span id="100">100</span>
|
|
||||||
<span id="101">101</span>
|
|
||||||
<span id="102">102</span>
|
|
||||||
<span id="103">103</span>
|
|
||||||
<span id="104">104</span>
|
|
||||||
<span id="105">105</span>
|
|
||||||
<span id="106">106</span>
|
|
||||||
<span id="107">107</span>
|
|
||||||
<span id="108">108</span>
|
|
||||||
<span id="109">109</span>
|
|
||||||
<span id="110">110</span>
|
|
||||||
<span id="111">111</span>
|
|
||||||
<span id="112">112</span>
|
|
||||||
<span id="113">113</span>
|
|
||||||
<span id="114">114</span>
|
|
||||||
<span id="115">115</span>
|
|
||||||
<span id="116">116</span>
|
|
||||||
<span id="117">117</span>
|
|
||||||
<span id="118">118</span>
|
|
||||||
<span id="119">119</span>
|
|
||||||
<span id="120">120</span>
|
|
||||||
<span id="121">121</span>
|
|
||||||
<span id="122">122</span>
|
|
||||||
<span id="123">123</span>
|
|
||||||
<span id="124">124</span>
|
|
||||||
<span id="125">125</span>
|
|
||||||
<span id="126">126</span>
|
|
||||||
<span id="127">127</span>
|
|
||||||
<span id="128">128</span>
|
|
||||||
<span id="129">129</span>
|
|
||||||
<span id="130">130</span>
|
|
||||||
<span id="131">131</span>
|
|
||||||
<span id="132">132</span>
|
|
||||||
<span id="133">133</span>
|
|
||||||
<span id="134">134</span>
|
|
||||||
<span id="135">135</span>
|
|
||||||
<span id="136">136</span>
|
|
||||||
<span id="137">137</span>
|
|
||||||
<span id="138">138</span>
|
|
||||||
<span id="139">139</span>
|
|
||||||
<span id="140">140</span>
|
|
||||||
<span id="141">141</span>
|
|
||||||
<span id="142">142</span>
|
|
||||||
<span id="143">143</span>
|
|
||||||
<span id="144">144</span>
|
|
||||||
<span id="145">145</span>
|
|
||||||
<span id="146">146</span>
|
|
||||||
<span id="147">147</span>
|
|
||||||
<span id="148">148</span>
|
|
||||||
<span id="149">149</span>
|
|
||||||
<span id="150">150</span>
|
|
||||||
<span id="151">151</span>
|
|
||||||
<span id="152">152</span>
|
|
||||||
<span id="153">153</span>
|
|
||||||
<span id="154">154</span>
|
|
||||||
<span id="155">155</span>
|
|
||||||
<span id="156">156</span>
|
|
||||||
<span id="157">157</span>
|
|
||||||
<span id="158">158</span>
|
|
||||||
<span id="159">159</span>
|
|
||||||
<span id="160">160</span>
|
|
||||||
<span id="161">161</span>
|
|
||||||
<span id="162">162</span>
|
|
||||||
<span id="163">163</span>
|
|
||||||
<span id="164">164</span>
|
|
||||||
<span id="165">165</span>
|
|
||||||
<span id="166">166</span>
|
|
||||||
<span id="167">167</span>
|
|
||||||
<span id="168">168</span>
|
|
||||||
<span id="169">169</span>
|
|
||||||
<span id="170">170</span>
|
|
||||||
<span id="171">171</span>
|
|
||||||
<span id="172">172</span>
|
|
||||||
<span id="173">173</span>
|
|
||||||
<span id="174">174</span>
|
|
||||||
<span id="175">175</span>
|
|
||||||
<span id="176">176</span>
|
|
||||||
<span id="177">177</span>
|
|
||||||
<span id="178">178</span>
|
|
||||||
<span id="179">179</span>
|
|
||||||
<span id="180">180</span>
|
|
||||||
<span id="181">181</span>
|
|
||||||
<span id="182">182</span>
|
|
||||||
<span id="183">183</span>
|
|
||||||
<span id="184">184</span>
|
|
||||||
<span id="185">185</span>
|
|
||||||
<span id="186">186</span>
|
|
||||||
<span id="187">187</span>
|
|
||||||
<span id="188">188</span>
|
|
||||||
<span id="189">189</span>
|
|
||||||
<span id="190">190</span>
|
|
||||||
<span id="191">191</span>
|
|
||||||
<span id="192">192</span>
|
|
||||||
<span id="193">193</span>
|
|
||||||
<span id="194">194</span>
|
|
||||||
<span id="195">195</span>
|
|
||||||
<span id="196">196</span>
|
|
||||||
<span id="197">197</span>
|
|
||||||
<span id="198">198</span>
|
|
||||||
<span id="199">199</span>
|
|
||||||
<span id="200">200</span>
|
|
||||||
<span id="201">201</span>
|
|
||||||
<span id="202">202</span>
|
|
||||||
<span id="203">203</span>
|
|
||||||
<span id="204">204</span>
|
|
||||||
<span id="205">205</span>
|
|
||||||
<span id="206">206</span>
|
|
||||||
<span id="207">207</span>
|
|
||||||
<span id="208">208</span>
|
|
||||||
<span id="209">209</span>
|
|
||||||
<span id="210">210</span>
|
|
||||||
<span id="211">211</span>
|
|
||||||
<span id="212">212</span>
|
|
||||||
<span id="213">213</span>
|
|
||||||
<span id="214">214</span>
|
|
||||||
<span id="215">215</span>
|
|
||||||
<span id="216">216</span>
|
|
||||||
<span id="217">217</span>
|
|
||||||
<span id="218">218</span>
|
|
||||||
<span id="219">219</span>
|
|
||||||
<span id="220">220</span>
|
|
||||||
<span id="221">221</span>
|
|
||||||
<span id="222">222</span>
|
|
||||||
<span id="223">223</span>
|
|
||||||
<span id="224">224</span>
|
|
||||||
<span id="225">225</span>
|
|
||||||
<span id="226">226</span>
|
|
||||||
<span id="227">227</span>
|
|
||||||
<span id="228">228</span>
|
|
||||||
<span id="229">229</span>
|
|
||||||
<span id="230">230</span>
|
|
||||||
<span id="231">231</span>
|
|
||||||
<span id="232">232</span>
|
|
||||||
<span id="233">233</span>
|
|
||||||
<span id="234">234</span>
|
|
||||||
<span id="235">235</span>
|
|
||||||
<span id="236">236</span>
|
|
||||||
<span id="237">237</span>
|
|
||||||
<span id="238">238</span>
|
|
||||||
<span id="239">239</span>
|
|
||||||
<span id="240">240</span>
|
|
||||||
<span id="241">241</span>
|
|
||||||
<span id="242">242</span>
|
|
||||||
<span id="243">243</span>
|
|
||||||
<span id="244">244</span>
|
|
||||||
<span id="245">245</span>
|
|
||||||
<span id="246">246</span>
|
|
||||||
<span id="247">247</span>
|
|
||||||
<span id="248">248</span>
|
|
||||||
<span id="249">249</span>
|
|
||||||
<span id="250">250</span>
|
|
||||||
<span id="251">251</span>
|
|
||||||
<span id="252">252</span>
|
|
||||||
<span id="253">253</span>
|
|
||||||
<span id="254">254</span>
|
|
||||||
<span id="255">255</span>
|
|
||||||
<span id="256">256</span>
|
|
||||||
<span id="257">257</span>
|
|
||||||
<span id="258">258</span>
|
|
||||||
<span id="259">259</span>
|
|
||||||
<span id="260">260</span>
|
|
||||||
<span id="261">261</span>
|
|
||||||
<span id="262">262</span>
|
|
||||||
<span id="263">263</span>
|
|
||||||
<span id="264">264</span>
|
|
||||||
<span id="265">265</span>
|
|
||||||
<span id="266">266</span>
|
|
||||||
<span id="267">267</span>
|
|
||||||
<span id="268">268</span>
|
|
||||||
<span id="269">269</span>
|
|
||||||
</pre><pre class='rust '>
|
|
||||||
<span class='doccomment'>//! *lamport* implements one-time hash-based signatures using the Lamport signature scheme.</span>
|
|
||||||
|
|
||||||
<span class='attribute'>#<span class='op'>!</span>[<span class='ident'>deny</span>(
|
|
||||||
<span class='ident'>missing_docs</span>,
|
|
||||||
<span class='ident'>missing_debug_implementations</span>, <span class='ident'>missing_copy_implementations</span>,
|
|
||||||
<span class='ident'>trivial_casts</span>, <span class='ident'>trivial_numeric_casts</span>,
|
|
||||||
<span class='ident'>unsafe_code</span>, <span class='ident'>unstable_features</span>,
|
|
||||||
<span class='ident'>unused_import_braces</span>, <span class='ident'>unused_qualifications</span>
|
|
||||||
)]</span>
|
|
||||||
|
|
||||||
<span class='kw'>extern</span> <span class='kw'>crate</span> <span class='ident'>ring</span>;
|
|
||||||
<span class='kw'>extern</span> <span class='kw'>crate</span> <span class='ident'>rand</span>;
|
|
||||||
|
|
||||||
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>hash</span>::{<span class='ident'>Hash</span>, <span class='ident'>Hasher</span>};
|
|
||||||
<span class='kw'>use</span> <span class='ident'>rand</span>::<span class='ident'>OsRng</span>;
|
|
||||||
<span class='kw'>use</span> <span class='ident'>rand</span>::<span class='ident'>Rng</span>;
|
|
||||||
<span class='kw'>use</span> <span class='ident'>ring</span>::<span class='ident'>digest</span>::{<span class='ident'>Algorithm</span>, <span class='ident'>Context</span>};
|
|
||||||
|
|
||||||
<span class='doccomment'>/// A type alias defining a Lamport signature</span>
|
|
||||||
<span class='kw'>pub</span> <span class='kw'>type</span> <span class='ident'>LamportSignatureData</span> <span class='op'>=</span> <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>>></span>;
|
|
||||||
|
|
||||||
<span class='doccomment'>/// A one-time signing public key</span>
|
|
||||||
<span class='attribute'>#[<span class='ident'>derive</span>(<span class='ident'>Clone</span>, <span class='ident'>Debug</span>)]</span>
|
|
||||||
<span class='kw'>pub</span> <span class='kw'>struct</span> <span class='ident'>PublicKey</span> {
|
|
||||||
<span class='ident'>zero_values</span>: <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>>></span>,
|
|
||||||
<span class='ident'>one_values</span>: <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>>></span>,
|
|
||||||
<span class='ident'>algorithm</span>: <span class='kw-2'>&</span><span class='lifetime'>'static</span> <span class='ident'>Algorithm</span>,
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='kw'>impl</span> <span class='ident'>PartialEq</span> <span class='kw'>for</span> <span class='ident'>PublicKey</span> {
|
|
||||||
<span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>trivial_casts</span>)]</span>
|
|
||||||
<span class='kw'>fn</span> <span class='ident'>eq</span>(<span class='kw-2'>&</span><span class='self'>self</span>, <span class='ident'>other</span>: <span class='kw-2'>&</span><span class='self'>Self</span>) <span class='op'>-></span> <span class='ident'>bool</span> {
|
|
||||||
<span class='self'>self</span>.<span class='ident'>zero_values</span> <span class='op'>==</span> <span class='ident'>other</span>.<span class='ident'>zero_values</span> <span class='op'>&&</span>
|
|
||||||
<span class='self'>self</span>.<span class='ident'>one_values</span> <span class='op'>==</span> <span class='ident'>other</span>.<span class='ident'>one_values</span> <span class='op'>&&</span>
|
|
||||||
<span class='self'>self</span>.<span class='ident'>algorithm</span> <span class='kw'>as</span> <span class='op'>*</span><span class='kw'>const</span> <span class='ident'>Algorithm</span> <span class='kw'>as</span> <span class='ident'>usize</span> <span class='op'>==</span> <span class='ident'>other</span>.<span class='ident'>algorithm</span> <span class='kw'>as</span> <span class='op'>*</span><span class='kw'>const</span> <span class='ident'>Algorithm</span> <span class='kw'>as</span> <span class='ident'>usize</span>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='kw'>impl</span> <span class='ident'>Hash</span> <span class='kw'>for</span> <span class='ident'>PublicKey</span> {
|
|
||||||
<span class='attribute'>#[<span class='ident'>allow</span>(<span class='ident'>trivial_casts</span>)]</span>
|
|
||||||
<span class='kw'>fn</span> <span class='ident'>hash</span><span class='op'><</span><span class='ident'>H</span>: <span class='ident'>Hasher</span><span class='op'>></span>(<span class='kw-2'>&</span><span class='self'>self</span>, <span class='ident'>state</span>: <span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='ident'>H</span>) {
|
|
||||||
<span class='self'>self</span>.<span class='ident'>zero_values</span>.<span class='ident'>hash</span>(<span class='ident'>state</span>);
|
|
||||||
<span class='self'>self</span>.<span class='ident'>one_values</span>.<span class='ident'>hash</span>(<span class='ident'>state</span>);
|
|
||||||
(<span class='self'>self</span>.<span class='ident'>algorithm</span> <span class='kw'>as</span> <span class='op'>*</span><span class='kw'>const</span> <span class='ident'>Algorithm</span> <span class='kw'>as</span> <span class='ident'>usize</span>).<span class='ident'>hash</span>(<span class='ident'>state</span>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='kw'>impl</span> <span class='ident'>Eq</span> <span class='kw'>for</span> <span class='ident'>PublicKey</span> {}
|
|
||||||
|
|
||||||
<span class='doccomment'>/// A one-time signing private key</span>
|
|
||||||
<span class='attribute'>#[<span class='ident'>derive</span>(<span class='ident'>Clone</span>, <span class='ident'>Debug</span>)]</span>
|
|
||||||
<span class='kw'>pub</span> <span class='kw'>struct</span> <span class='ident'>PrivateKey</span> {
|
|
||||||
<span class='comment'>// For a n bits hash function: (n * n/8 bytes) for zero_values and one_values</span>
|
|
||||||
<span class='ident'>zero_values</span>: <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>>></span>,
|
|
||||||
<span class='ident'>one_values</span>: <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>>></span>,
|
|
||||||
<span class='ident'>algorithm</span>: <span class='kw-2'>&</span><span class='lifetime'>'static</span> <span class='ident'>Algorithm</span>,
|
|
||||||
<span class='ident'>used</span>: <span class='ident'>bool</span>,
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='kw'>impl</span> <span class='ident'>From</span><span class='op'><</span><span class='ident'>PublicKey</span><span class='op'>></span> <span class='kw'>for</span> <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>></span> {
|
|
||||||
<span class='kw'>fn</span> <span class='ident'>from</span>(<span class='ident'>original</span>: <span class='ident'>PublicKey</span>) <span class='op'>-></span> <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>></span> {
|
|
||||||
<span class='ident'>original</span>.<span class='ident'>to_bytes</span>()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='kw'>impl</span> <span class='ident'>PublicKey</span> {
|
|
||||||
<span class='doccomment'>/// Intializes a public key with a byte vector.</span>
|
|
||||||
<span class='doccomment'>/// Returns `None` if it couldn't parse the provided data</span>
|
|
||||||
<span class='kw'>pub</span> <span class='kw'>fn</span> <span class='ident'>from_vec</span>(<span class='ident'>vec</span>: <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>></span>, <span class='ident'>algorithm</span>: <span class='kw-2'>&</span><span class='lifetime'>'static</span> <span class='ident'>Algorithm</span>) <span class='op'>-></span> <span class='prelude-ty'>Option</span><span class='op'><</span><span class='ident'>PublicKey</span><span class='op'>></span> {
|
|
||||||
<span class='kw'>let</span> <span class='ident'>size</span> <span class='op'>=</span> <span class='ident'>vec</span>.<span class='ident'>len</span>();
|
|
||||||
<span class='kw'>let</span> <span class='ident'>hash_output_size</span> <span class='op'>=</span> <span class='ident'>algorithm</span>.<span class='ident'>output_len</span>;
|
|
||||||
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>zero_values_merged</span> <span class='op'>=</span> <span class='ident'>vec</span>;
|
|
||||||
<span class='kw'>let</span> <span class='ident'>one_values_merged</span> <span class='op'>=</span> <span class='ident'>zero_values_merged</span>.<span class='ident'>split_off</span>(<span class='ident'>size</span> <span class='op'>/</span> <span class='number'>2</span>);
|
|
||||||
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>zero_values</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
|
|
||||||
<span class='kw'>for</span> <span class='ident'>i</span> <span class='kw'>in</span> (<span class='number'>0</span>..<span class='ident'>zero_values_merged</span>.<span class='ident'>len</span>()).<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>x</span> <span class='op'>%</span> <span class='ident'>hash_output_size</span> <span class='op'>==</span> <span class='number'>0</span>) {
|
|
||||||
<span class='comment'>// indexes for heads</span>
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>sub_vec</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
|
|
||||||
<span class='kw'>for</span> <span class='ident'>j</span> <span class='kw'>in</span> <span class='number'>0</span>..<span class='ident'>hash_output_size</span> {
|
|
||||||
<span class='ident'>sub_vec</span>.<span class='ident'>push</span>(<span class='ident'>zero_values_merged</span>[<span class='ident'>i</span> <span class='op'>+</span> <span class='ident'>j</span>]);
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='ident'>zero_values</span>.<span class='ident'>push</span>(<span class='ident'>sub_vec</span>);
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>one_values</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
|
|
||||||
<span class='kw'>for</span> <span class='ident'>i</span> <span class='kw'>in</span> (<span class='number'>0</span>..<span class='ident'>one_values_merged</span>.<span class='ident'>len</span>()).<span class='ident'>filter</span>(<span class='op'>|</span><span class='ident'>x</span><span class='op'>|</span> <span class='ident'>x</span> <span class='op'>%</span> <span class='ident'>hash_output_size</span> <span class='op'>==</span> <span class='number'>0</span>) {
|
|
||||||
<span class='comment'>// indexes for heads</span>
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>sub_vec</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>new</span>();
|
|
||||||
<span class='kw'>for</span> <span class='ident'>j</span> <span class='kw'>in</span> <span class='number'>0</span>..<span class='ident'>hash_output_size</span> {
|
|
||||||
<span class='ident'>sub_vec</span>.<span class='ident'>push</span>(<span class='ident'>one_values_merged</span>[<span class='ident'>i</span> <span class='op'>+</span> <span class='ident'>j</span>]);
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='ident'>one_values</span>.<span class='ident'>push</span>(<span class='ident'>sub_vec</span>);
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='prelude-val'>Some</span>(<span class='ident'>PublicKey</span> {
|
|
||||||
<span class='ident'>zero_values</span>: <span class='ident'>zero_values</span>,
|
|
||||||
<span class='ident'>one_values</span>: <span class='ident'>one_values</span>,
|
|
||||||
<span class='ident'>algorithm</span>: <span class='ident'>algorithm</span>,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='doccomment'>/// Serializes a public key into a byte vector</span>
|
|
||||||
<span class='kw'>pub</span> <span class='kw'>fn</span> <span class='ident'>to_bytes</span>(<span class='kw-2'>&</span><span class='self'>self</span>) <span class='op'>-></span> <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>></span> {
|
|
||||||
<span class='self'>self</span>.<span class='ident'>zero_values</span>.<span class='ident'>iter</span>().<span class='ident'>chain</span>(<span class='self'>self</span>.<span class='ident'>one_values</span>.<span class='ident'>iter</span>()).<span class='ident'>fold</span>(<span class='ident'>Vec</span>::<span class='ident'>new</span>(), <span class='op'>|</span><span class='kw-2'>mut</span> <span class='ident'>acc</span>, <span class='ident'>i</span><span class='op'>|</span> {
|
|
||||||
<span class='ident'>acc</span>.<span class='ident'>append</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='ident'>i</span>.<span class='ident'>clone</span>());
|
|
||||||
<span class='ident'>acc</span>
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='doccomment'>/// Verifies that the signature of the data is correctly signed with the given key</span>
|
|
||||||
<span class='kw'>pub</span> <span class='kw'>fn</span> <span class='ident'>verify_signature</span>(<span class='kw-2'>&</span><span class='self'>self</span>, <span class='ident'>signature</span>: <span class='kw-2'>&</span><span class='ident'>LamportSignatureData</span>, <span class='ident'>data</span>: <span class='kw-2'>&</span>[<span class='ident'>u8</span>]) <span class='op'>-></span> <span class='ident'>bool</span> {
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>context</span> <span class='op'>=</span> <span class='ident'>Context</span>::<span class='ident'>new</span>(<span class='self'>self</span>.<span class='ident'>algorithm</span>);
|
|
||||||
<span class='ident'>context</span>.<span class='ident'>update</span>(<span class='ident'>data</span>);
|
|
||||||
<span class='kw'>let</span> <span class='ident'>result</span> <span class='op'>=</span> <span class='ident'>context</span>.<span class='ident'>finish</span>();
|
|
||||||
<span class='kw'>let</span> <span class='ident'>data_hash</span> <span class='op'>=</span> <span class='ident'>result</span>.<span class='ident'>as_ref</span>();
|
|
||||||
|
|
||||||
<span class='kw'>for</span> (<span class='ident'>i</span>, <span class='ident'>byte</span>) <span class='kw'>in</span> <span class='ident'>data_hash</span>.<span class='ident'>iter</span>().<span class='ident'>enumerate</span>() {
|
|
||||||
<span class='kw'>for</span> <span class='ident'>j</span> <span class='kw'>in</span> <span class='number'>0</span>..<span class='number'>8</span> {
|
|
||||||
<span class='kw'>let</span> <span class='ident'>offset</span> <span class='op'>=</span> <span class='ident'>i</span> <span class='op'>*</span> <span class='number'>8</span> <span class='op'>+</span> <span class='ident'>j</span>;
|
|
||||||
<span class='kw'>if</span> (<span class='ident'>byte</span> <span class='kw-2'>&</span> (<span class='number'>1</span> <span class='op'><<</span> <span class='ident'>j</span>)) <span class='op'>></span> <span class='number'>0</span> {
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>context</span> <span class='op'>=</span> <span class='ident'>Context</span>::<span class='ident'>new</span>(<span class='self'>self</span>.<span class='ident'>algorithm</span>);
|
|
||||||
<span class='ident'>context</span>.<span class='ident'>update</span>(<span class='ident'>signature</span>[<span class='ident'>offset</span>].<span class='ident'>as_slice</span>());
|
|
||||||
<span class='kw'>let</span> <span class='ident'>hashed_value</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>from</span>(<span class='ident'>context</span>.<span class='ident'>finish</span>().<span class='ident'>as_ref</span>());
|
|
||||||
|
|
||||||
<span class='kw'>if</span> <span class='ident'>hashed_value</span> <span class='op'>!=</span> <span class='self'>self</span>.<span class='ident'>one_values</span>[<span class='ident'>offset</span>] {
|
|
||||||
<span class='kw'>return</span> <span class='bool-val'>false</span>;
|
|
||||||
}
|
|
||||||
} <span class='kw'>else</span> {
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>context</span> <span class='op'>=</span> <span class='ident'>Context</span>::<span class='ident'>new</span>(<span class='self'>self</span>.<span class='ident'>algorithm</span>);
|
|
||||||
<span class='ident'>context</span>.<span class='ident'>update</span>(<span class='ident'>signature</span>[<span class='ident'>offset</span>].<span class='ident'>as_slice</span>());
|
|
||||||
<span class='kw'>let</span> <span class='ident'>hashed_value</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>from</span>(<span class='ident'>context</span>.<span class='ident'>finish</span>().<span class='ident'>as_ref</span>());
|
|
||||||
|
|
||||||
<span class='kw'>if</span> <span class='ident'>hashed_value</span> <span class='op'>!=</span> <span class='self'>self</span>.<span class='ident'>zero_values</span>[<span class='ident'>offset</span>] {
|
|
||||||
<span class='kw'>return</span> <span class='bool-val'>false</span>;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='bool-val'>true</span>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='kw'>impl</span> <span class='ident'>PrivateKey</span> {
|
|
||||||
<span class='doccomment'>/// Generates a new random one-time signing key. This method can panic if OS RNG fails</span>
|
|
||||||
<span class='kw'>pub</span> <span class='kw'>fn</span> <span class='ident'>new</span>(<span class='ident'>algorithm</span>: <span class='kw-2'>&</span><span class='lifetime'>'static</span> <span class='ident'>Algorithm</span>) <span class='op'>-></span> <span class='ident'>PrivateKey</span> {
|
|
||||||
<span class='kw'>let</span> <span class='ident'>generate_bit_hash_values</span> <span class='op'>=</span> <span class='op'>||</span> <span class='op'>-></span> <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>>></span> {
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>rng</span> <span class='op'>=</span> <span class='kw'>match</span> <span class='ident'>OsRng</span>::<span class='ident'>new</span>() {
|
|
||||||
<span class='prelude-val'>Ok</span>(<span class='ident'>g</span>) <span class='op'>=></span> <span class='ident'>g</span>,
|
|
||||||
<span class='prelude-val'>Err</span>(<span class='ident'>e</span>) <span class='op'>=></span> <span class='macro'>panic</span><span class='macro'>!</span>(<span class='string'>"Failed to obtain OS RNG: {}"</span>, <span class='ident'>e</span>),
|
|
||||||
};
|
|
||||||
<span class='kw'>let</span> <span class='ident'>buffer_byte</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0u8</span>; <span class='ident'>algorithm</span>.<span class='ident'>output_len</span>];
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>buffer</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='ident'>buffer_byte</span>; <span class='ident'>algorithm</span>.<span class='ident'>output_len</span> <span class='op'>*</span> <span class='number'>8</span>];
|
|
||||||
|
|
||||||
<span class='kw'>for</span> <span class='ident'>hash</span> <span class='kw'>in</span> <span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='ident'>buffer</span> {
|
|
||||||
<span class='ident'>rng</span>.<span class='ident'>fill_bytes</span>(<span class='ident'>hash</span>)
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='ident'>buffer</span>
|
|
||||||
};
|
|
||||||
|
|
||||||
<span class='kw'>let</span> <span class='ident'>zero_values</span> <span class='op'>=</span> <span class='ident'>generate_bit_hash_values</span>();
|
|
||||||
<span class='kw'>let</span> <span class='ident'>one_values</span> <span class='op'>=</span> <span class='ident'>generate_bit_hash_values</span>();
|
|
||||||
|
|
||||||
<span class='ident'>PrivateKey</span> {
|
|
||||||
<span class='ident'>zero_values</span>: <span class='ident'>zero_values</span>,
|
|
||||||
<span class='ident'>one_values</span>: <span class='ident'>one_values</span>,
|
|
||||||
<span class='ident'>algorithm</span>: <span class='ident'>algorithm</span>,
|
|
||||||
<span class='ident'>used</span>: <span class='bool-val'>false</span>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='doccomment'>/// Returns the public key associated with this private key</span>
|
|
||||||
<span class='kw'>pub</span> <span class='kw'>fn</span> <span class='ident'>public_key</span>(<span class='kw-2'>&</span><span class='self'>self</span>) <span class='op'>-></span> <span class='ident'>PublicKey</span> {
|
|
||||||
<span class='kw'>let</span> <span class='ident'>hash_values</span> <span class='op'>=</span> <span class='op'>|</span><span class='ident'>x</span>: <span class='kw-2'>&</span><span class='ident'>Vec</span><span class='op'><</span><span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>>></span><span class='op'>|</span> <span class='op'>-></span> <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>>></span> {
|
|
||||||
<span class='kw'>let</span> <span class='ident'>buffer_byte</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='number'>0u8</span>; <span class='self'>self</span>.<span class='ident'>algorithm</span>.<span class='ident'>output_len</span>];
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>buffer</span> <span class='op'>=</span> <span class='macro'>vec</span><span class='macro'>!</span>[<span class='ident'>buffer_byte</span>; <span class='self'>self</span>.<span class='ident'>algorithm</span>.<span class='ident'>output_len</span> <span class='op'>*</span> <span class='number'>8</span>];
|
|
||||||
|
|
||||||
<span class='kw'>for</span> <span class='ident'>i</span> <span class='kw'>in</span> <span class='number'>0</span> .. <span class='self'>self</span>.<span class='ident'>algorithm</span>.<span class='ident'>output_len</span> <span class='op'>*</span> <span class='number'>8</span> {
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>context</span> <span class='op'>=</span> <span class='ident'>Context</span>::<span class='ident'>new</span>(<span class='self'>self</span>.<span class='ident'>algorithm</span>);
|
|
||||||
<span class='ident'>context</span>.<span class='ident'>update</span>(<span class='ident'>x</span>[<span class='ident'>i</span>].<span class='ident'>as_slice</span>());
|
|
||||||
<span class='ident'>buffer</span>[<span class='ident'>i</span>] <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>from</span>(<span class='ident'>context</span>.<span class='ident'>finish</span>().<span class='ident'>as_ref</span>());
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='ident'>buffer</span>
|
|
||||||
};
|
|
||||||
|
|
||||||
<span class='kw'>let</span> <span class='ident'>hashed_zero_values</span> <span class='op'>=</span> <span class='ident'>hash_values</span>(<span class='kw-2'>&</span><span class='self'>self</span>.<span class='ident'>zero_values</span>);
|
|
||||||
<span class='kw'>let</span> <span class='ident'>hashed_one_values</span> <span class='op'>=</span> <span class='ident'>hash_values</span>(<span class='kw-2'>&</span><span class='self'>self</span>.<span class='ident'>one_values</span>);
|
|
||||||
|
|
||||||
<span class='ident'>PublicKey</span> {
|
|
||||||
<span class='ident'>zero_values</span>: <span class='ident'>hashed_zero_values</span>,
|
|
||||||
<span class='ident'>one_values</span>: <span class='ident'>hashed_one_values</span>,
|
|
||||||
<span class='ident'>algorithm</span>: <span class='self'>self</span>.<span class='ident'>algorithm</span>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='doccomment'>/// Signs the data with the private key and returns the result if successful.</span>
|
|
||||||
<span class='doccomment'>/// If unsuccesful, an explanation string is returned</span>
|
|
||||||
<span class='kw'>pub</span> <span class='kw'>fn</span> <span class='ident'>sign</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='self'>self</span>, <span class='ident'>data</span>: <span class='kw-2'>&</span>[<span class='ident'>u8</span>]) <span class='op'>-></span> <span class='prelude-ty'>Result</span><span class='op'><</span><span class='ident'>LamportSignatureData</span>, <span class='kw-2'>&</span><span class='lifetime'>'static</span> <span class='ident'>str</span><span class='op'>></span> {
|
|
||||||
<span class='kw'>if</span> <span class='self'>self</span>.<span class='ident'>used</span> {
|
|
||||||
<span class='kw'>return</span> <span class='prelude-val'>Err</span>(<span class='string'>"Attempting to sign more than once."</span>);
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>context</span> <span class='op'>=</span> <span class='ident'>Context</span>::<span class='ident'>new</span>(<span class='self'>self</span>.<span class='ident'>algorithm</span>);
|
|
||||||
<span class='ident'>context</span>.<span class='ident'>update</span>(<span class='ident'>data</span>);
|
|
||||||
<span class='kw'>let</span> <span class='ident'>result</span> <span class='op'>=</span> <span class='ident'>context</span>.<span class='ident'>finish</span>();
|
|
||||||
<span class='kw'>let</span> <span class='ident'>data_hash</span> <span class='op'>=</span> <span class='ident'>result</span>.<span class='ident'>as_ref</span>();
|
|
||||||
|
|
||||||
<span class='kw'>let</span> <span class='ident'>signature_len</span> <span class='op'>=</span> <span class='ident'>data_hash</span>.<span class='ident'>len</span>() <span class='op'>*</span> <span class='number'>8</span>;
|
|
||||||
<span class='kw'>let</span> <span class='kw-2'>mut</span> <span class='ident'>signature</span> <span class='op'>=</span> <span class='ident'>Vec</span>::<span class='ident'>with_capacity</span>(<span class='ident'>signature_len</span>);
|
|
||||||
|
|
||||||
<span class='kw'>for</span> (<span class='ident'>i</span>, <span class='ident'>byte</span>) <span class='kw'>in</span> <span class='ident'>data_hash</span>.<span class='ident'>iter</span>().<span class='ident'>enumerate</span>() {
|
|
||||||
<span class='kw'>for</span> <span class='ident'>j</span> <span class='kw'>in</span> <span class='number'>0</span>..<span class='number'>8</span> {
|
|
||||||
<span class='kw'>let</span> <span class='ident'>offset</span> <span class='op'>=</span> <span class='ident'>i</span> <span class='op'>*</span> <span class='number'>8</span> <span class='op'>+</span> <span class='ident'>j</span>;
|
|
||||||
<span class='kw'>if</span> (<span class='ident'>byte</span> <span class='kw-2'>&</span> (<span class='number'>1</span> <span class='op'><<</span> <span class='ident'>j</span>)) <span class='op'>></span> <span class='number'>0</span> {
|
|
||||||
<span class='comment'>// Bit is 1</span>
|
|
||||||
<span class='ident'>signature</span>.<span class='ident'>push</span>(<span class='self'>self</span>.<span class='ident'>one_values</span>[<span class='ident'>offset</span>].<span class='ident'>clone</span>());
|
|
||||||
} <span class='kw'>else</span> {
|
|
||||||
<span class='comment'>// Bit is 0</span>
|
|
||||||
<span class='ident'>signature</span>.<span class='ident'>push</span>(<span class='self'>self</span>.<span class='ident'>zero_values</span>[<span class='ident'>offset</span>].<span class='ident'>clone</span>());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<span class='self'>self</span>.<span class='ident'>used</span> <span class='op'>=</span> <span class='bool-val'>true</span>;
|
|
||||||
<span class='prelude-val'>Ok</span>(<span class='ident'>signature</span>)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='kw'>impl</span> <span class='ident'>Drop</span> <span class='kw'>for</span> <span class='ident'>PrivateKey</span> {
|
|
||||||
<span class='kw'>fn</span> <span class='ident'>drop</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='self'>self</span>) {
|
|
||||||
<span class='kw'>let</span> <span class='ident'>zeroize_vector</span> <span class='op'>=</span> <span class='op'>|</span><span class='ident'>vector</span>: <span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='ident'>Vec</span><span class='op'><</span><span class='ident'>Vec</span><span class='op'><</span><span class='ident'>u8</span><span class='op'>>></span><span class='op'>|</span> {
|
|
||||||
<span class='kw'>for</span> <span class='ident'>v2</span> <span class='kw'>in</span> <span class='ident'>vector</span>.<span class='ident'>iter_mut</span>() {
|
|
||||||
<span class='kw'>for</span> <span class='ident'>byte</span> <span class='kw'>in</span> <span class='ident'>v2</span>.<span class='ident'>iter_mut</span>() {
|
|
||||||
<span class='op'>*</span><span class='ident'>byte</span> <span class='op'>=</span> <span class='number'>0</span>;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
<span class='ident'>zeroize_vector</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='self'>self</span>.<span class='ident'>zero_values</span>);
|
|
||||||
<span class='ident'>zeroize_vector</span>(<span class='kw-2'>&</span><span class='kw-2'>mut</span> <span class='self'>self</span>.<span class='ident'>one_values</span>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='kw'>impl</span> <span class='ident'>PartialEq</span> <span class='kw'>for</span> <span class='ident'>PrivateKey</span> {
|
|
||||||
<span class='comment'>// ⚠️ This is not a constant-time implementation</span>
|
|
||||||
<span class='kw'>fn</span> <span class='ident'>eq</span>(<span class='kw-2'>&</span><span class='self'>self</span>, <span class='ident'>other</span>: <span class='kw-2'>&</span><span class='ident'>PrivateKey</span>) <span class='op'>-></span> <span class='ident'>bool</span> {
|
|
||||||
<span class='kw'>if</span> <span class='self'>self</span>.<span class='ident'>one_values</span>.<span class='ident'>len</span>() <span class='op'>!=</span> <span class='ident'>other</span>.<span class='ident'>one_values</span>.<span class='ident'>len</span>() {
|
|
||||||
<span class='kw'>return</span> <span class='bool-val'>false</span>;
|
|
||||||
}
|
|
||||||
<span class='kw'>if</span> <span class='self'>self</span>.<span class='ident'>zero_values</span>.<span class='ident'>len</span>() <span class='op'>!=</span> <span class='ident'>other</span>.<span class='ident'>zero_values</span>.<span class='ident'>len</span>() {
|
|
||||||
<span class='kw'>return</span> <span class='bool-val'>false</span>;
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='kw'>for</span> <span class='ident'>i</span> <span class='kw'>in</span> <span class='number'>0</span>..<span class='self'>self</span>.<span class='ident'>zero_values</span>.<span class='ident'>len</span>() {
|
|
||||||
<span class='kw'>if</span> <span class='self'>self</span>.<span class='ident'>zero_values</span>[<span class='ident'>i</span>] <span class='op'>!=</span> <span class='ident'>other</span>.<span class='ident'>zero_values</span>[<span class='ident'>i</span>] <span class='op'>||</span>
|
|
||||||
<span class='self'>self</span>.<span class='ident'>one_values</span>[<span class='ident'>i</span>] <span class='op'>!=</span> <span class='ident'>other</span>.<span class='ident'>one_values</span>[<span class='ident'>i</span>] {
|
|
||||||
<span class='kw'>return</span> <span class='bool-val'>false</span>;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<span class='bool-val'>true</span>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<span class='attribute'>#[<span class='ident'>cfg</span>(<span class='ident'>test</span>)]</span>
|
|
||||||
<span class='kw'>pub</span> <span class='kw'>mod</span> <span class='ident'>tests</span>;
|
|
||||||
</pre>
|
|
||||||
</section>
|
|
||||||
<section id='search' class="content hidden"></section>
|
|
||||||
|
|
||||||
<section class="footer"></section>
|
|
||||||
|
|
||||||
<aside id="help" class="hidden">
|
|
||||||
<div>
|
|
||||||
<h1 class="hidden">Help</h1>
|
|
||||||
|
|
||||||
<div class="shortcuts">
|
|
||||||
<h2>Keyboard Shortcuts</h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>?</dt>
|
|
||||||
<dd>Show this help dialog</dd>
|
|
||||||
<dt>S</dt>
|
|
||||||
<dd>Focus the search field</dd>
|
|
||||||
<dt>⇤</dt>
|
|
||||||
<dd>Move up in search results</dd>
|
|
||||||
<dt>⇥</dt>
|
|
||||||
<dd>Move down in search results</dd>
|
|
||||||
<dt>⏎</dt>
|
|
||||||
<dd>Go to active search result</dd>
|
|
||||||
<dt>+</dt>
|
|
||||||
<dd>Collapse/expand all sections</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="infos">
|
|
||||||
<h2>Search Tricks</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Prefix searches with a type followed by a colon (e.g.
|
|
||||||
<code>fn:</code>) to restrict the search to a given type.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
|
||||||
<code>struct</code>, <code>enum</code>,
|
|
||||||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
|
||||||
and <code>const</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Search functions by type signature (e.g.
|
|
||||||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
window.rootPath = "../../../";
|
|
||||||
window.currentCrate = "lamport_sigs";
|
|
||||||
window.playgroundUrl = "";
|
|
||||||
</script>
|
|
||||||
<script src="../../../jquery.js"></script>
|
|
||||||
<script src="../../../main.js"></script>
|
|
||||||
|
|
||||||
<script defer src="../../../search-index.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Reference in New Issue
Block a user