code: func IsEncryptedPEMBlock(block *pem.Block) bool {
  	der := block.Bytes
  
  	var privKey encryptedPrivateKeyInfo
  	if _, err := asn1.Unmarshal(der, &privKey); err != nil {
  		return false
  	}
  
  	return true
  }
docs: // IsEncryptedPEMBlock checks if a PKCS#8 PEM-block is encrypted or not