utils

package
v2.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const SM2_DEFAULT_USER_ID = "1234567812345678"

SM2_DEFAULT_USER_ID is the default uid of sm2 algorithm

View Source
const (
	// SM4_BlockSize represents sm4 block size
	SM4_BlockSize = 16
)

Variables

View Source
var (

	// OidNamedCurveSm2 is sm2 curve asn1 object identifier
	OidNamedCurveSm2 = asn1.ObjectIdentifier{1, 2, 156, 10197, 1, 301}
)
View Source
var (
	OidSM2 = asn1.ObjectIdentifier{1, 2, 840, 10045, 2, 1} // SM2 id
)

curve

Functions

func OidFromNamedCurve

func OidFromNamedCurve(curve elliptic.Curve) (asn1.ObjectIdentifier, bool)

OidFromNamedCurve return the oid of curve

func P256Sm2

func P256Sm2() elliptic.Curve

P256Sm2 init and returns sm2 curve

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL