Documentation ¶
Overview ¶
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. //////////////////////////////////////////////////////////////////////////////
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. //////////////////////////////////////////////////////////////////////////////
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. //////////////////////////////////////////////////////////////////////////////
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. //////////////////////////////////////////////////////////////////////////////
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EcdsaSign ¶
type EcdsaSign struct {
// contains filtered or unexported fields
}
ecdsaSign is an implementation of PublicKeySign for ECDSA. At the moment, the implementation only accepts DER encoding.
func NewEcdsaSign ¶
func NewEcdsaSign(hashAlg string, curve string, encoding string, keyValue []byte) (*EcdsaSign, error)
NewEcdsaSign creates a new instance of EcdsaSign.
func NewEcdsaSignFromPrivateKey ¶
func NewEcdsaSignFromPrivateKey(hashAlg string, encoding string, privateKey *ecdsa.PrivateKey) (*EcdsaSign, error)
NewEcdsaSignFromPrivateKey creates a new instance of EcdsaSign
type EcdsaSignature ¶
ecdsaSignature is a struct holding r and s values of an ECDSA signature.
func DecodeSignature ¶
func DecodeSignature(encodedBytes []byte, encoding string) (*EcdsaSignature, error)
DecodeSignature creates a new ECDSA signature using the given byte slice. The function assumes that the byte slice is the concatenation of the BigEndian representation of two big integer r and s.
func NewSignature ¶
func NewSignature(r, s *big.Int) *EcdsaSignature
newSignature creates a new ecdsaSignature object.
type EcdsaVerify ¶
type EcdsaVerify struct {
// contains filtered or unexported fields
}
ecdsaVerify is an implementation of PublicKeyVerify for ECDSA. At the moment, the implementation only accepts signatures with strict DER encoding.
func NewEcdsaVerify ¶
func NewEcdsaVerify(hashAlg string, curve string, encoding string, x []byte, y []byte) (*EcdsaVerify, error)
NewEcdsaVerify creates a new instance of EcdsaVerify.
func NewEcdsaVerifyFromPublicKey ¶
func NewEcdsaVerifyFromPublicKey(hashAlg string, encoding string, publicKey *ecdsa.PublicKey) (*EcdsaVerify, error)
NewEcdsaVerifyFromPublicKey creates a new instance of EcdsaVerify.