Pārlūkot izejas kodu

crypto: add import comments.

Change-Id: I33240faf1b8620d0cd600de661928d8e422ebdbc
Reviewed-on: https://go-review.googlesource.com/1235
Reviewed-by: Andrew Gerrand <adg@golang.org>
David Symonds 11 gadi atpakaļ
vecāks
revīzija
1fbbd62cfe

+ 1 - 1
bcrypt/bcrypt.go

@@ -4,7 +4,7 @@
 
 // Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing
 // algorithm. See http://www.usenix.org/event/usenix99/provos/provos.pdf
-package bcrypt
+package bcrypt // import "golang.org/x/crypto/bcrypt"
 
 // The code is a port of Provos and Mazières's C implementation.
 import (

+ 1 - 1
blowfish/cipher.go

@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
-package blowfish
+package blowfish // import "golang.org/x/crypto/blowfish"
 
 // The code is a port of Bruce Schneier's C implementation.
 // See http://www.schneier.com/blowfish.html.

+ 1 - 1
bn256/bn256.go

@@ -14,7 +14,7 @@
 // Barreto-Naehrig curve as described in
 // http://cryptojedi.org/papers/dclxvi-20100714.pdf. Its output is compatible
 // with the implementation described in that paper.
-package bn256
+package bn256 // import "golang.org/x/crypto/bn256"
 
 import (
 	"crypto/rand"

+ 1 - 1
cast5/cast5.go

@@ -4,7 +4,7 @@
 
 // Package cast5 implements CAST5, as defined in RFC 2144. CAST5 is a common
 // OpenPGP cipher.
-package cast5
+package cast5 // import "golang.org/x/crypto/cast5"
 
 import "errors"
 

+ 1 - 1
curve25519/doc.go

@@ -4,7 +4,7 @@
 
 // Package curve25519 provides an implementation of scalar multiplication on
 // the elliptic curve known as curve25519. See http://cr.yp.to/ecdh.html
-package curve25519
+package curve25519 // import "golang.org/x/crypto/curve25519"
 
 // basePoint is the x coordinate of the generator of the curve.
 var basePoint = [32]byte{9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

+ 1 - 1
hkdf/hkdf.go

@@ -10,7 +10,7 @@
 // strong secret keys.
 //
 // RFC 5869: https://tools.ietf.org/html/rfc5869
-package hkdf
+package hkdf // import "golang.org/x/crypto/hkdf"
 
 import (
 	"crypto/hmac"

+ 1 - 1
md4/md4.go

@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Package md4 implements the MD4 hash algorithm as defined in RFC 1320.
-package md4
+package md4 // import "golang.org/x/crypto/md4"
 
 import (
 	"crypto"

+ 1 - 1
nacl/box/box.go

@@ -15,7 +15,7 @@ negligible risk of collision.
 
 This package is interoperable with NaCl: http://nacl.cr.yp.to/box.html.
 */
-package box
+package box // import "golang.org/x/crypto/nacl/box"
 
 import (
 	"golang.org/x/crypto/curve25519"

+ 1 - 1
nacl/secretbox/secretbox.go

@@ -15,7 +15,7 @@ negligible risk of collision.
 
 This package is interoperable with NaCl: http://nacl.cr.yp.to/secretbox.html.
 */
-package secretbox
+package secretbox // import "golang.org/x/crypto/nacl/secretbox"
 
 import (
 	"golang.org/x/crypto/poly1305"

+ 1 - 1
ocsp/ocsp.go

@@ -5,7 +5,7 @@
 // Package ocsp parses OCSP responses as specified in RFC 2560. OCSP responses
 // are signed messages attesting to the validity of a certificate for a small
 // period of time. This is used to manage revocation for X.509 certificates.
-package ocsp
+package ocsp // import "golang.org/x/crypto/ocsp"
 
 import (
 	"crypto"

+ 1 - 1
openpgp/armor/armor.go

@@ -4,7 +4,7 @@
 
 // Package armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is
 // very similar to PEM except that it has an additional CRC checksum.
-package armor
+package armor // import "golang.org/x/crypto/openpgp/armor"
 
 import (
 	"bufio"

+ 1 - 1
openpgp/clearsign/clearsign.go

@@ -7,7 +7,7 @@
 //
 // Clearsigned messages are cryptographically signed, but the contents of the
 // message are kept in plaintext so that it can be read without special tools.
-package clearsign
+package clearsign // import "golang.org/x/crypto/openpgp/clearsign"
 
 import (
 	"bufio"

+ 1 - 1
openpgp/elgamal/elgamal.go

@@ -10,7 +10,7 @@
 // This form of ElGamal embeds PKCS#1 v1.5 padding, which may make it
 // unsuitable for other protocols. RSA should be used in preference in any
 // case.
-package elgamal
+package elgamal // import "golang.org/x/crypto/openpgp/elgamal"
 
 import (
 	"crypto/rand"

+ 1 - 1
openpgp/errors/errors.go

@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Package errors contains common error types for the OpenPGP packages.
-package errors
+package errors // import "golang.org/x/crypto/openpgp/errors"
 
 import (
 	"strconv"

+ 1 - 1
openpgp/packet/packet.go

@@ -4,7 +4,7 @@
 
 // Package packet implements parsing and serialization of OpenPGP packets, as
 // specified in RFC 4880.
-package packet
+package packet // import "golang.org/x/crypto/openpgp/packet"
 
 import (
 	"bufio"

+ 1 - 1
openpgp/read.go

@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Package openpgp implements high level operations on OpenPGP messages.
-package openpgp
+package openpgp // import "golang.org/x/crypto/openpgp"
 
 import (
 	"crypto"

+ 1 - 1
openpgp/s2k/s2k.go

@@ -4,7 +4,7 @@
 
 // Package s2k implements the various OpenPGP string-to-key transforms as
 // specified in RFC 4800 section 3.7.1.
-package s2k
+package s2k // import "golang.org/x/crypto/openpgp/s2k"
 
 import (
 	"crypto"

+ 1 - 1
otr/otr.go

@@ -4,7 +4,7 @@
 
 // Package otr implements the Off The Record protocol as specified in
 // http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html
-package otr
+package otr // import "golang.org/x/crypto/otr"
 
 import (
 	"bytes"

+ 1 - 1
pbkdf2/pbkdf2.go

@@ -16,7 +16,7 @@ Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To
 choose, you can pass the `New` functions from the different SHA packages to
 pbkdf2.Key.
 */
-package pbkdf2
+package pbkdf2 // import "golang.org/x/crypto/pbkdf2"
 
 import (
 	"crypto/hmac"

+ 1 - 1
poly1305/poly1305.go

@@ -16,7 +16,7 @@ used with a fixed key in order to generate one-time keys from an nonce.
 However, in this package AES isn't used and the one-time key is specified
 directly.
 */
-package poly1305
+package poly1305 // import "golang.org/x/crypto/poly1305"
 
 import "crypto/subtle"
 

+ 1 - 1
ripemd160/ripemd160.go

@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Package ripemd160 implements the RIPEMD-160 hash algorithm.
-package ripemd160
+package ripemd160 // import "golang.org/x/crypto/ripemd160"
 
 // RIPEMD-160 is designed by by Hans Dobbertin, Antoon Bosselaers, and Bart
 // Preneel with specifications available at:

+ 1 - 1
salsa20/salsa/hsalsa20.go

@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Package salsa provides low-level access to functions in the Salsa family.
-package salsa
+package salsa // import "golang.org/x/crypto/salsa20/salsa"
 
 // Sigma is the Salsa20 constant for 256-bit keys.
 var Sigma = [16]byte{'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'}

+ 1 - 1
salsa20/salsa20.go

@@ -19,7 +19,7 @@ This package also implements XSalsa20: a version of Salsa20 with a 24-byte
 nonce as specified in http://cr.yp.to/snuffle/xsalsa-20081128.pdf. Simply
 passing a 24-byte slice as the nonce triggers XSalsa20.
 */
-package salsa20
+package salsa20 // import "golang.org/x/crypto/salsa20"
 
 // TODO(agl): implement XORKeyStream12 and XORKeyStream8 - the reduced round variants of Salsa20.
 

+ 1 - 1
scrypt/scrypt.go

@@ -5,7 +5,7 @@
 // Package scrypt implements the scrypt key derivation function as defined in
 // Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard
 // Functions" (http://www.tarsnap.com/scrypt/scrypt.pdf).
-package scrypt
+package scrypt // import "golang.org/x/crypto/scrypt"
 
 import (
 	"crypto/sha256"

+ 1 - 1
sha3/doc.go

@@ -65,4 +65,4 @@
 // They produce output of the same length, with the same security strengths
 // against all attacks. This means, in particular, that SHA3-256 only has
 // 128-bit collision resistance, because its output length is 32 bytes.
-package sha3
+package sha3 // import "golang.org/x/crypto/sha3"

+ 1 - 1
ssh/agent/client.go

@@ -8,7 +8,7 @@
 References:
   [PROTOCOL.agent]:    http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.agent
 */
-package agent
+package agent // import "golang.org/x/crypto/ssh/agent"
 
 import (
 	"bytes"

+ 1 - 1
ssh/doc.go

@@ -15,4 +15,4 @@ References:
   [PROTOCOL.certkeys]: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys
   [SSH-PARAMETERS]:    http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1
 */
-package ssh
+package ssh // import "golang.org/x/crypto/ssh"

+ 1 - 1
ssh/terminal/util.go

@@ -14,7 +14,7 @@
 // 	        panic(err)
 // 	}
 // 	defer terminal.Restore(0, oldState)
-package terminal
+package terminal // import "golang.org/x/crypto/ssh/terminal"
 
 import (
 	"io"

+ 1 - 1
ssh/test/doc.go

@@ -4,4 +4,4 @@
 
 // This package contains integration tests for the
 // code.google.com/p/go.crypto/ssh package.
-package test
+package test // import "golang.org/x/crypto/ssh/test"

+ 1 - 1
ssh/testdata/doc.go

@@ -5,4 +5,4 @@
 // This package contains test data shared between the various subpackages of
 // the code.google.com/p/go.crypto/ssh package. Under no circumstance should
 // this data be used for production code.
-package testdata
+package testdata // import "golang.org/x/crypto/ssh/testdata"

+ 1 - 1
twofish/twofish.go

@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Package twofish implements Bruce Schneier's Twofish encryption algorithm.
-package twofish
+package twofish // import "golang.org/x/crypto/twofish"
 
 // Twofish is defined in http://www.schneier.com/paper-twofish-paper.pdf [TWOFISH]
 

+ 1 - 1
xtea/cipher.go

@@ -4,7 +4,7 @@
 
 // Package xtea implements XTEA encryption, as defined in Needham and Wheeler's
 // 1997 technical report, "Tea extensions."
-package xtea
+package xtea // import "golang.org/x/crypto/xtea"
 
 // For details, see http://www.cix.co.uk/~klockstone/xtea.pdf
 

+ 1 - 1
xts/xts.go

@@ -19,7 +19,7 @@
 //
 // (Note: this package does not implement ciphertext-stealing so sectors must
 // be a multiple of 16 bytes.)
-package xts
+package xts // import "golang.org/x/crypto/xts"
 
 import (
 	"crypto/cipher"