func NewPublicKey(pubKey *domain.PublicKey) *PublicKeyDataElement {
	if !reflect.DeepEqual(pubKey.Exponent, []byte("65537")) {
		panic(fmt.Errorf("Exponent must equal 65537 (% X)", "65537"))
	}
	p := &PublicKeyDataElement{
		Usage:         NewAlphaNumeric(pubKey.Type, 3),
		OperationMode: NewAlphaNumeric("16", 3),
		Cipher:        NewAlphaNumeric("10", 3),
		Modulus:       NewBinary(pubKey.Modulus, 512),
		ModulusID:     NewAlphaNumeric("12", 3),
		Exponent:      NewBinary(pubKey.Exponent, 512),
		ExponentID:    NewAlphaNumeric("13", 3),
	}
	p.DataElement = NewDataElementGroup(publicKeyDEG, 7, p)
	return p
}
// NewPublicKey creates a new PublicKeyElement from pubKey
NewPublicKey creates a new PublicKeyElement from pubKey
// NewPublicKey creates a new PublicKeyElement from pubKey
func NewPublicKey(pubKey *domain.PublicKey) *PublicKeyDataElement {
	if !reflect.DeepEqual(pubKey.Exponent, []byte("65537")) {
		panic(fmt.Errorf("Exponent must equal 65537 (% X)", "65537"))
	}
	p := &PublicKeyDataElement{
		Usage:         NewAlphaNumeric(pubKey.Type, 3),
		OperationMode: NewAlphaNumeric("16", 3),
		Cipher:        NewAlphaNumeric("10", 3),
		Modulus:       NewBinary(pubKey.Modulus, 512),
		ModulusID:     NewAlphaNumeric("12", 3),
		Exponent:      NewBinary(pubKey.Exponent, 512),
		ExponentID:    NewAlphaNumeric("13", 3),
	}
	p.DataElement = NewDataElementGroup(publicKeyDEG, 7, p)
	return p
}
func NewPublicKey ( pubKey * domain . PublicKey ) * PublicKeyDataElement { if ! reflect . DeepEqual ( pubKey . Exponent , [ ] byte ( " " ) ) { panic ( fmt . Errorf ( " " , " " ) ) } p := & PublicKeyDataElement { Usage : NewAlphaNumeric ( pubKey . Type , 3 ) , OperationMode : NewAlphaNumeric ( " " , 3 ) , Cipher : NewAlphaNumeric ( " " , 3 ) , Modulus : NewBinary ( pubKey . Modulus , 512 ) , ModulusID : NewAlphaNumeric ( " " , 3 ) , Exponent : NewBinary ( pubKey . Exponent , 512 ) , ExponentID : NewAlphaNumeric ( " " , 3 ) , } p . DataElement = NewDataElementGroup ( publicKeyDEG , 7 , p ) return p }
NewPublicKey creates a new PublicKeyElement from pubKey
NewPublicKey creates a new PublicKeyElement from pubKey