Sha256: cf19397fdc34cef36658369d94f67523f9415efb99d51ab4b493047d142ad149

Contents?: true

Size: 729 Bytes

Versions: 16

Compression:

Stored size: 729 Bytes

Contents

package jose

import (
	"errors"
)

// Plaintext (no signing) signing algorithm implementation
type Plaintext struct{}

func init() {
	RegisterJws(new(Plaintext))
}

func (alg *Plaintext) Name() string {
	return NONE
}

func (alg *Plaintext) Verify(securedInput []byte, signature []byte, key interface{}) error {

	if key != nil {
		return errors.New("Plaintext.Verify() expects key to be nil")
	}

	if len(signature) != 0 {
		return errors.New("Plaintext.Verify() expects signature to be empty.")
	}

	return nil
}

func (alg *Plaintext) Sign(securedInput []byte, key interface{}) (signature []byte, err error) {

	if key != nil {
		return nil, errors.New("Plaintext.Verify() expects key to be nil")
	}

	return []byte{}, nil
}

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ruby_snowflake_client-1.3.7 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.3.6 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.3.5 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.3.4 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.3.4.pre.debug ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.3.3.pre.debug ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.3.2 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.3.1 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.3.0 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.2.1 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.2.0 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.1.1 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.1.0 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.0.2 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.0.1 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go
ruby_snowflake_client-1.0.0 ext/vendor/github.com/dvsekhvalnov/jose2go/plaintext.go