code stringlengths 10 1.34M | language stringclasses 1
value |
|---|---|
// Copyright 2011 Google Inc. All Rights Reserved.
//
// 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... | Go |
// Copyright 2011 Google Inc. All Rights Reserved.
//
// 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... | Go |
// Copyright 2011 Google Inc. All Rights Reserved.
//
// 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... | Go |
// Copyright 2011 Google Inc. All Rights Reserved.
//
// 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... | Go |
// Copyright 2011 Google Inc. All Rights Reserved.
//
// 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... | Go |
// Copyright 2011 Google Inc. All Rights Reserved.
//
// 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... | Go |
// Copyright 2011 Google Inc. All Rights Reserved.
//
// 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... | Go |
// Copyright 2011 Google Inc. All Rights Reserved.
//
// 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... | Go |
package main
import "fmt"
func main() {
fmt.Printf("Hello, world.\n");
}
| Go |
package main
import (
"encoding/xml"
"fmt"
"net/http"
"net/url"
"regexp"
"time"
)
const (
googleCodesiteURL = "http://code.google.com/"
googleCodesiteTimeLayout = "Wed Sep 28 15:04:05 2006"
ActivityGoogleCodesiteReporte = "GoogleCodesiteReport"
ActivityGoogleCodesiteChange = "GoogleCodesiteChange"
Activ... | Go |
package main
import (
"encoding/json"
"flag"
"fmt"
"net/http"
"net/url"
"regexp"
"strconv"
"strings"
"time"
)
const (
chromiumBuildbot = "http://build.chromium.org/p/chromium/json"
// Buildbot/builders/<builder>/builds/<buildnum> => BuildData
)
var (
bugRegexp = regexp.MustCompile("\nBUG=([0-9, ]... | Go |
package yolo
import (
"appengine"
"appengine/datastore"
"appengine/user"
"encoding/json"
"fmt"
"net/http"
"regexp"
"time"
)
const numItemsPerPage = 20
func init() {
http.HandleFunc("/", topPage)
http.HandleFunc("/yolo/yolo-token.js", getTokenJS)
http.HandleFunc("/ajax/tree_status", getTreeStatus)
http.H... | Go |
package yolo
import (
"appengine"
"appengine/urlfetch"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"regexp"
"runtime"
"strconv"
"time"
)
type yoloErrorString string
type YoloError struct {
file string
line int
message string
}
func (e YoloError) Error() string {
return fmt.Sprintf("%s:%v: %Ts", e.file... | Go |
package yolo
import (
"appengine"
"appengine/taskqueue"
"appengine/urlfetch"
"encoding/json"
"fmt"
"net/http"
"net/url"
"regexp"
"strconv"
"strings"
"time"
)
const (
chromiumStatusURL = "http://chromium-status.appspot.com/allstatus?format=json"
chromiumStatusTimeLayout = "2006-01-02 15:04:05"
A... | Go |
package yolo
import (
"appengine"
"net/mail"
)
const (
)
type MailProcessor interface {
ShouldProcess(c appengine.Context, msg *mail.Message) bool
Process(c appengine.Context, msg *mail.Message)
}
var mailProcessors = make([]MailProcessor, 0)
func RegisterMailProcessor(mp MailProcessor) {
mailProcessors = app... | Go |
package yolo
import (
"appengine"
"appengine/memcache"
"appengine/taskqueue"
"appengine/urlfetch"
"encoding/json"
"fmt"
"net/http"
"net/url"
"regexp"
"strconv"
"strings"
"time"
)
const (
chromiumBuildbot = "http://build.chromium.org/p/chromium/json"
chromiumBuildbotSiteURL = "build.chromium.org"
// Bui... | Go |
package yolo
import (
"appengine"
"appengine/datastore"
"fmt"
"strings"
"time"
)
const (
issueMaxDescriptionLength = 200
)
func init() {
RegisterCacheableType(Issue{})
}
func CreateIssueId(siteURL, issueId interface{}) string {
return fmt.Sprintf("%s/%v", siteURL, issueId)
}
func ParseIssueId(c appengine.C... | Go |
package yolo
import (
"appengine"
"appengine/datastore"
"appengine/taskqueue"
"encoding/json"
"fmt"
"net/http"
"regexp"
"sort"
"strings"
"time"
)
type ActivityNotifier func(c appengine.Context, a *ActivityData)
var activityNotifiers = map[string]ActivityNotifier{} // type -> notifier
func init() {
http.Ha... | Go |
package yolo
const (
SiteRietveldChromium = "codereview.chromium.org"
SiteRietveldAppspot = "codereview.appspot.com"
SiteBugzillaWebKit = "bugs.webkit.org"
SiteGoogleCodesite = "code.google.com"
)
func GetSupportedSites() []string {
sites := make([]string, 0)
sites = append(sites, SiteRietveldChromium)
sites =... | Go |
package yolo
import (
"appengine/datastore"
"html"
"net/http"
"html/template"
"strings"
"time"
)
type AdminPage struct {
writer http.ResponseWriter
XsrfToken string
}
func NewAdminPage(w http.ResponseWriter, r *http.Request) *AdminPage {
page := new(AdminPage)
page.writer = w
return page
}
type PollConte... | Go |
package yolo
import (
"appengine"
"appengine/taskqueue"
"time"
)
type PostParams map[string][]string
func mayPostTask(c appengine.Context, url string, qname string, params PostParams, max int) (bool, error) {
counter := &Counter{url + "-queue-cnt"}
if v, _ := counter.Increment(c); v > max {
counter.Decrement... | Go |
package yolo
import (
"appengine"
"appengine/channel"
"appengine/datastore"
"appengine/memcache"
"crypto/rand"
"encoding/base64"
"io"
"net/http"
"time"
)
func init() {
// for channel_presence (from=<token>)
http.HandleFunc("/_ah/channel/connected/", channelConnected)
http.HandleFunc("/_ah/channel/disconne... | Go |
package yolo
import (
"appengine"
"appengine/memcache"
"encoding/json"
)
type TryConflictError struct {
message string
}
func (err TryConflictError) Error() string {
return err.message
}
var TryConflictErr = TryConflictError{message: "TryConflict error!"}
type CounterData struct {
Count int
}
type Counter s... | Go |
package yolo
import (
"appengine"
"appengine/datastore"
"fmt"
"time"
)
func init() {
RegisterCacheableType(UserActivities{})
RegisterCacheableType(UserCommits{})
}
type User struct {
Email string
}
func NewUser(email string) *User {
return &User{email}
}
func AddUser(c appengine.Context, email string) erro... | Go |
package yolo
import (
"appengine"
"fmt"
"net/http"
"net/url"
"regexp"
"strconv"
"strings"
"time"
)
const (
rietveldTimeoutLayout = "2006-01-02 15:04:05"
rietveldExcludeUser = "commit-bot@chromium.org"
rietveldUpdateFetchMaxIssues = 20
)
func init() {
RegisterPoller(SiteRietveldChromium, NewRietveldPoll... | Go |
package yolo
import (
"appengine"
"appengine/datastore"
"appengine/memcache"
"appengine/taskqueue"
"fmt"
"net/http"
"net/mail"
"strings"
"strconv"
"time"
)
func init() {
http.HandleFunc("/admin/", showAdminTop)
// Proof of concept, no fancy UI
http.HandleFunc("/admin/users", listUsers)
http.HandleFunc(... | Go |
package yolo
import (
"appengine"
"appengine/datastore"
"appengine/taskqueue"
"fmt"
"net/http"
"strings"
"time"
)
func init() {
// Poller task handlers: it takes key=PollContext.Key(c) parameter and
// stops running if PollContext.Stopped is marked true.
http.HandleFunc("/worker/poller_run_task", handlePoll... | Go |
package yolo
import (
"appengine"
"appengine/taskqueue"
"appengine/urlfetch"
"bytes"
"encoding/xml"
"fmt"
"net/http"
"net/mail"
"net/url"
"regexp"
"strconv"
"time"
)
const (
googleCodesiteURL = "code.google.com"
googleCodesiteTimeLayout = "Wed Sep 28 15:04:05 2006"
ActivityGoogleCodesiteReport = "Goo... | Go |
package yolo
import (
"appengine"
"appengine/datastore"
"appengine/memcache"
"appengine/taskqueue"
"encoding/json"
"fmt"
"net/http"
"reflect"
"strings"
"time"
)
func init() {
// Flush the memcache to the datastore.
http.HandleFunc("/worker/cache_flush", handleCacheFlush)
}
var types = make(map[string]ref... | Go |
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"regexp"
"strings"
"time"
)
const (
chromiumStatusURL = "http://chromium-status.appspot.com/allstatus?format=json"
timeLayout = "2006-01-02 15:04:05"
)
var (
autoCloserRegexp = regexp.MustCompile(`Tree is closed \(Automatic: .* on .* f... | Go |
package feed
import (
"encoding/json"
"errors"
"time"
)
type MaxFeed struct {
strings []string
times []time.Time
head, tail, offset int
full bool
}
func NewMaxFeed(n int) *MaxFeed {
return &MaxFeed{make([]string, n), make([]time.Time, n), 0, 0, 0, false}
}
func (q *MaxF... | Go |
package feed
import (
"time"
)
type SetFeed struct {
entries map[string]FeedEntry
count int
}
func NewSetFeed() *SetFeed {
return &SetFeed{make(map[string]FeedEntry), 0}
}
func (q *SetFeed) SinceTime(t time.Time) (entries BasicFeed) {
for _,v := range q.entries {
if v.Time.After(t) {
entries = append(ent... | Go |
package feed
import (
"time"
)
type BasicFeed []FeedEntry
type FeedEntry struct {
Index int
Id string
Time time.Time
}
type Feed interface {
Add(string, time.Time)
SinceTime(t time.Time) BasicFeed
Since(id int) BasicFeed
}
| Go |
package main
import (
"flag"
"log"
"reflect"
"encoding/json"
graphc "code.google.com/p/feedgraph/graph/http"
graph "code.google.com/p/feedgraph/graph"
"github.com/alexjlockwood/gcm"
)
var g graphc.Proxy
type watcher struct {
node string
regId string
}
type message struct {
JSONString string
}
var watcher... | Go |
// graph http client -- needs work!
package http
import (
"code.google.com/p/cloud9lib/restc"
"net/url"
"code.google.com/p/feedgraph/graph"
"code.google.com/p/feedgraph/config"
"strconv"
)
type Edge struct {
Source, Sink, Relation string
}
type Proxy struct {
base string
g string
}
type NodeProxy struct {
... | Go |
/* imported for its side-effect of adding HTTP handlers:
GET /
GET /{graph}.html
GET /{graph}/{node}.json
GET /{graph}/{node}/{relation}.json
GET /{graph}/{node}.html
POST /{graph}/{node}/{relation}/{node2}
POST /{graph}/{node}/{relation}
PUT /{graph}/{node}
*/
package httpd
import (
"co... | Go |
// logs graphs to disk for backup and restore
package backup
import (
"log"
"time"
"encoding/csv"
graph "code.google.com/p/feedgraph/graph/http"
)
type Backup struct {
records chan []string
}
func WriteRecord(w *csv.Writer, g, src, dest, rel string, at time.Time) {
err := w.Write([]string{g, src, rel, dest, ... | Go |
package graph
import (
"time"
"sync"
"strconv"
"path/filepath"
"code.google.com/p/go-uuid/uuid"
)
type Edge struct {
Index int
UUID string
Object interface{}
Node string
Relation string
TimeStamp string
}
type Row struct {
Id string
Rel string
Edge Edge
Deleted bool
}
type Node struct {
Object inte... | Go |
package main
import (
"log"
"fmt"
"net/http"
"image"
"bytes"
"io"
"io/ioutil"
"strings"
_ "image/png"
_ "image/jpeg"
_ "image/gif"
"code.google.com/p/gorilla/mux"
"launchpad.net/goamz/aws"
"launchpad.net/goamz/s3"
"code.google.com/p/go-uuid/uuid"
)
const MAX_WIDTH = 600
const MAX_HEIGHT = 800
const BUC... | Go |
// special graphd instance for internal communication among nodes
//
// masterd waits for N nodes to register, and then publishes config info
package main
import (
graph "code.google.com/p/feedgraph/graph/httpd"
"code.google.com/p/feedgraph/config"
"net/http"
"flag"
"log"
"time"
)
const addr = ":81"
func mai... | Go |
package main
import (
graph "code.google.com/p/feedgraph/graph/httpd"
"code.google.com/p/feedgraph/config"
"net/http"
_ "net/http/pprof"
"flag"
"log"
)
const defaultAddr = ":8081"
func main() {
master := flag.String("master", "", "IP:port of graphd instance with config info")
addr := flag.String("addr", de... | Go |
/* http server and subdomain mux */
package main
import (
"net"
"net/http"
"net/http/httputil"
"net/url"
"regexp"
hash "hash/adler32"
"code.google.com/p/feedgraph/config"
"code.google.com/p/cloud9lib/rest"
"flag"
"log"
"io/ioutil"
"encoding/json"
"strconv"
)
var nodeProxies []*httputil.ReverseProxy
var b... | Go |
package main
import (
"code.google.com/p/feedgraph/graph/backup"
"encoding/csv"
"os"
"time"
)
func main () {
stamp := time.Now().Format(time.Stamp)
file, err := os.Create("data/" + stamp + ".csv")
if err != nil {
panic(err)
}
w := csv.NewWriter(file)
bu := backup.New()
bu.RecordAll()
bu.Write(w)... | Go |
package rest
import (
"net/http"
"encoding/json"
"fmt"
"io/ioutil"
)
func WriteObject(w http.ResponseWriter, req *http.Request, obj interface{}) error {
text, err := json.Marshal(obj)
if err != nil {
return err
}
cb := req.FormValue("callback")
if cb != "" {
fmt.Fprintf(w, "%s(%s);", cb, string(text)... | Go |
// a meta-package to assist in building the entire project
package feedgraph
import (
_ "code.google.com/p/feedgraph/feed"
_ "code.google.com/p/feedgraph/graph"
_ "code.google.com/p/feedgraph/graph/http"
_ "code.google.com/p/feedgraph/graph/httpd"
_ "code.google.com/p/feedgraph/js/httpd"
_ "code.google.com/p/fe... | Go |
package config
func init() {
Local = Config{
HTTPConfig: HTTPConfig{
APIBaseURL: "http://api.feedgraph.com/",
APIPattern: "api.feedgraph.com/",
Redirects: []Redirect{
{"bottlcap.com/", "http://bottlcap.breezi.com"},
{"virtualwatchparth.com/", "http://www.virtualwatchparty.com"},
{"labratro... | Go |
package config
import (
"net"
"fmt"
"log"
"code.google.com/p/cloud9lib/restc"
)
type Redirect struct {
Pattern string
Target string
}
type Proxy struct {
Pattern string
Target string
}
type FileServer struct {
Pattern string
Path string
}
type HTTPConfig struct {
APIBaseURL string
APIPattern string
Re... | Go |
package main
import (
"net/http"
"os"
"code.google.com/p/cloud9lib/restc"
"log"
"code.google.com/p/feedgraph/rest"
)
type Geometry struct {
Location Location "location"
}
type Location struct {
Lat float64
Lng float64
}
type Place struct {
ID string
Name string
Icon string
Geometry Geometry
Latitude fl... | Go |
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"os"
"os/exec"
"path"
"runtime"
"code.google.com/p/goauth2/oauth"
"code.google.com/p/google-api-go-client/youtube/v3"
)
var (
clientSecretsFile = flag.String("secrets", "client_secrets.json", "Client Secrets... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package cast5 implements CAST5, as defined in RFC 2144. CAST5 is a common
// OpenPGP cipher.
package cast5
import "errors"
const BlockSize = 8
const KeySiz... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bn256
import (
"math/big"
)
func bigFromBase10(s string) *big.Int {
n, _ := new(big.Int).SetString(s, 10)
return n
}
// u is the BN parameter that... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bn256
// For details of the algorithms used, see "Multiplication and Squaring on
// Pairing-Friendly Fields, Devegili et al.
// http://eprint.iacr.org/... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package bn256 implements a particular bilinear group at the 128-bit security level.
//
// Bilinear groups are the basis of many of the new cryptographic prot... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bn256
// For details of the algorithms used, see "Multiplication and Squaring on
// Pairing-Friendly Fields, Devegili et al.
// http://eprint.iacr.org/... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bn256
import (
"math/big"
)
// curvePoint implements the elliptic curve y²=x³+3. Points are kept in
// Jacobian form and t=z² when valid. G₁ is the s... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bn256
func lineFunctionAdd(r, p *twistPoint, q *curvePoint, r2 *gfP2, pool *bnPool) (a, b, c *gfP2, rOut *twistPoint) {
// See the mixed addition algo... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bn256
// For details of the algorithms used, see "Multiplication and Squaring on
// Pairing-Friendly Fields, Devegili et al.
// http://eprint.iacr.org/... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bn256
import (
"math/big"
)
// twistPoint implements the elliptic curve y²=x³+3/ξ over GF(p²). Points are
// kept in Jacobian form and t=z² when vali... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Package salsa20 implements the Salsa20 stream cipher as specified in http://cr.yp.to/snuffle/spec.pdf.
Salsa20 differs from many other stream ciphers in tha... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !amd64 appengine gccgo
package salsa
const rounds = 20
// core applies the Salsa20 core function to 16-byte input in, 32-byte key k,
// and 16-byte... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package salsa
// Core208 applies the Salsa20/8 core function to the 64-byte array in and puts
// the result into the 64-byte array out. The input and output ma... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build amd64,!appengine,!gccgo
package salsa
// This function is implemented in salsa2020_amd64.s.
func salsa2020XORKeyStream(out, in *byte, n uint64, nonc... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package salsa provides low-level access to functions in the Salsa family.
package salsa
// Sigma is the Salsa20 constant for 256-bit keys.
var Sigma = [16]b... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Package poly1305 implements Poly1305 one-time message authentication code as specified in http://cr.yp.to/mac/poly1305-20050329.pdf.
Poly1305 is a fast, one... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !amd64 gccgo
package poly1305
// Based on original, public domain implementation from NaCl by D. J.
// Bernstein.
import "math"
const (
alpham80 ... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build amd64,!gccgo
package poly1305
// This function is implemented in poly1305_amd64.s
func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte)
... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package scrypt implements the scrypt key derivation function as defined in
// Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard
// F... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Implementation adapted from Needham and Wheeler's paper:
http://www.cix.co.uk/~klockstone/xtea.pdf
A precalculated look up table is used during encryptio... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package xtea implements XTEA encryption, as defined in Needham and Wheeler's
// 1997 technical report, "Tea extensions."
package xtea
// For details, see ht... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The startup permutation array and substitution boxes.
// They are the hexadecimal digits of PI; see:
// http://www.schneier.com/code/constants.txt.
package ... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package blowfish
// ExpandKey performs a key expansion on the given *Cipher. Specifically, it
// performs the Blowfish algorithm's key schedule which sets up t... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
package blowfish
// The code is a port of Bruce Schneier's C implementation.
// ... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build amd64,!gccgo
package curve25519
// These functions are implemented in the .s files. The names of the functions
// in the rest of the file are also t... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// We have a implementation in amd64 assembly so this code is only run on
// non-amd64 platforms. The amd64 assembly does not support gccgo.
// +build !amd64 g... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package curve25519 provides an implementation of scalar multiplication on
// the elliptic curve known as curve25519. See http://cr.yp.to/ecdh.html
package cu... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Package secretbox encrypts and authenticates small messages.
Secretbox uses XSalsa20 and Poly1305 to encrypt and authenticate messages with
secret-key crypt... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Package box authenticates and encrypts messages using public-key cryptography.
Box uses Curve25519, XSalsa20 and Poly1305 to encrypt and authenticate
messag... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// MD4 block step.
// In its own file so that a faster assembly or C version
// can be substituted easily.
package md4
var shift1 = []uint{3, 7, 11, 19}
var s... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package md4 implements the MD4 hash algorithm as defined in RFC 1320.
package md4
import (
"crypto"
"hash"
)
func init() {
crypto.RegisterHash(crypto.MD... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package xts implements the XTS cipher mode as specified in IEEE P1619/D16.
//
// XTS mode is typically used for disk encryption, which presents a number of
/... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package ripemd160 implements the RIPEMD-160 hash algorithm.
package ripemd160
// RIPEMD-160 is designed by by Hans Dobbertin, Antoon Bosselaers, and Bart
//... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// RIPEMD-160 block step.
// In its own file so that a faster assembly or C version
// can be substituted easily.
package ripemd160
// work buffer indices and... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package otr implements the Off The Record protocol as specified in
// http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html
package otr
import (
"bytes"
"c... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file implements the Socialist Millionaires Protocol as described in
// http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html. The protocol
// specificati... | Go |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package clearsign generates and processes OpenPGP, clear-signed data. See
// RFC 4880, section 7.
//
// Clearsigned messages are cryptographically signed, bu... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package s2k implements the various OpenPGP string-to-key transforms as
// specified in RFC 4800 section 3.7.1.
package s2k
import (
"code.google.com/p/go.c... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package openpgp implements high level operations on OpenPGP messages.
package openpgp
import (
"code.google.com/p/go.crypto/openpgp/armor"
"code.google.co... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packet
import (
"code.google.com/p/go.crypto/openpgp/errors"
"code.google.com/p/go.crypto/openpgp/s2k"
"crypto"
"encoding/binary"
"io"
"strconv"
... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packet
import (
"code.google.com/p/go.crypto/openpgp/errors"
"code.google.com/p/go.crypto/openpgp/s2k"
"crypto"
"crypto/dsa"
"crypto/rsa"
"encodi... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packet
import (
"code.google.com/p/go.crypto/openpgp/errors"
"crypto/cipher"
"crypto/sha1"
"crypto/subtle"
"hash"
"io"
"strconv"
)
// Symmetric... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packet
import (
"code.google.com/p/go.crypto/openpgp/elgamal"
"code.google.com/p/go.crypto/openpgp/errors"
"crypto/dsa"
"crypto/rsa"
"crypto/sha1"... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packet
import (
"code.google.com/p/go.crypto/openpgp/errors"
"compress/flate"
"compress/zlib"
"io"
"strconv"
)
// Compressed represents a compres... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packet
import (
"bytes"
"code.google.com/p/go.crypto/openpgp/elgamal"
"code.google.com/p/go.crypto/openpgp/errors"
"code.google.com/p/go.crypto/ope... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packet
import (
"code.google.com/p/go.crypto/openpgp/elgamal"
"code.google.com/p/go.crypto/openpgp/errors"
"crypto/rsa"
"encoding/binary"
"io"
"m... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// OpenPGP CFB Mode. http://tools.ietf.org/html/rfc4880#section-13.9
package packet
import (
"crypto/cipher"
)
type ocfbEncrypter struct {
b cipher.B... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packet
import (
"io"
"io/ioutil"
"strings"
)
// UserId contains text that is intended to represent the name and email
// address of the key holder.... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packet
import (
"code.google.com/p/go.crypto/openpgp/errors"
"io"
)
// Reader reads packets from an io.Reader and allows packets to be 'unread' so
/... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packet
import (
"bytes"
"code.google.com/p/go.crypto/openpgp/errors"
"code.google.com/p/go.crypto/openpgp/s2k"
"crypto/cipher"
"io"
"strconv"
)
... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package packet
import (
"encoding/binary"
"io"
)
// LiteralData represents an encrypted file. See RFC 4880, section 5.9.
type LiteralData struct {
IsBinary... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package packet implements parsing and serialization of OpenPGP packets, as
// specified in RFC 4880.
package packet
import (
"code.google.com/p/go.crypto/c... | Go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.